So, this is my core.php starting file.
<?php
require_once("src/ts3admin.class.php");
require_once("config/config-admin.php");
require_once("config/config-login.php");
function include_all_php($folder){
foreach (glob("funkcje/Administrator/*.php") as $filename)
{
include $filename;
}
}
include_all_php("my_classes");
$ts = new ts3admin($Polaczenie['logowanie']['Address'], $Polaczenie['logowanie']['Port-Query']);
if($ts->getElement('success', $ts->connect())) {
$ts->selectServer($Polaczenie['logowanie']['Port-Login']);
$ts->login($Polaczenie['logowanie']['Login'], $Polaczenie['logowanie']['Password']);
$ts->setName(''.$Polaczenie['logowanie']['Nick_BoT_Admin']);
$whoami = $ts->getElement('data', $ts->whoAmI());
$ts->clientMove($whoami['client_id'], $Polaczenie['logowanie']['Channel_ID']);
}
while(true) {
adminsonline();
adminList();
automatyczneRangi();
ban();
channelsAdmins();
PokeAdmin();
Promotion();
ochronaGroup();
test();
sleep(1);
}
?>
but I want to make the core so I dont have to add every function, I already did that to including all files w *.php
function include_all_php($folder){
foreach (glob("funkcje/Administrator/*.php") as $filename)
{
include $filename;
}
}
include_all_php("my_classes");
but now, I want to make the core so that it will add their name.
Something like adding all files to 1 variable and deleting the ".php" and putting (); to it.
For example:
while(true) {
$filename.'();
sleep(1);
}
?>
something like that.
Thank you!