Put 250 trust me. I had an problem with this and someone told me to put 250 and it worked lmao.Hi
I think your bot in some moment has been disconnected due to timeout.
You need to send keep-alive commands (version or smth else. Doesn't matter really). Default timeout is 600 seconds (if i not mistake, or 300)
Be more specific, or post some code example.Yes He Helped Me But Where Can I Put My PHP Commands
this is my code example i wanna this bot poke user every 10 sec. i know how to do it but i don't know where can i put itBe more specific, or post some code example.
<?php
require_once("assets/config.php");
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
?>
<?php
/* load framework library */
/* initialize */
TeamSpeak3::init();
try
{
/* subscribe to various events */
TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyServerselected", "onSelect");
/* connect to server, login and get TeamSpeak3_Node_Host object by URI */
$ts3 = TeamSpeak3::factory("serverquery://".$YATQA_user.":".$YATQA_pass."@".$YATQA_ip.":".$query_port."/?server_port=9987&blocking=0&nickname=[AM]LevelBoost");
/* wait for events */
while(1) {
$ts3->getAdapter()->wait();
// Here I Wanna To Add My Code But If I Add it no thing done
}
}
catch(Exception $e)
{
die("[ERROR] " . $e->getMessage() . "\n");
}
function onTimeout($seconds, TeamSpeak3_Adapter_ServerQuery $adapter)
{
echo "[INFO]\tno reply from the server for " . $seconds . " seconds\n";
if($adapter->getQueryLastTimestamp() < time()-250)
{
$adapter->request("clientupdate");
}
}
function onSelect(TeamSpeak3_Node_Host $host)
{
TeamSpeak3_Helper_Signal::getInstance()->subscribe("serverqueryWaitTimeout", "onTimeout");
$host->serverGetSelected()->notifyRegister("server");
echo "Connected to: " . $host->serverGetSelected()->getProperty("virtualserver_name") . "\n\n";
}
?>