Bot Still In The Server [PHP FrameWork]

Yousef

Active Member
Nov 16, 2017
36
9
83
Hello Users ,

I Wanna To Create S Bot Still In The Server 24H and didn't time out from the server With PHP Framework [Planet]

i Try To Make it but it time out after 6 hours or 3 hours or 5 minuts

Thanks
 

FromLondon

Honk Honk
TeamSpeak Developer
VIP
May 20, 2016
264
107
136
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)
 

kalle

high minded
Contributor
Oct 28, 2015
411
253
178
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)
Put 250 trust me. I had an problem with this and someone told me to put 250 and it worked lmao.
Edit: yes I remember now, @ewenjo helped me with this info. :D
 
Last edited:

Yousef

Active Member
Nov 16, 2017
36
9
83
Put 250 trust me. I had an problem with this and someone told me to put 250 and it worked lmao.
Edit: yes I remember now, @ewenjo helped me with this info. :D


Yes He Helped Me But Where Can I Put My PHP Commands
 

Yousef

Active Member
Nov 16, 2017
36
9
83
Be more specific, or post some code example.
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 it
PHP:
<?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";

}

?>
 
Top