helps clock and date bot

vupyC

Member
Mar 2, 2016
29
0
36
this script is bag ?
PHP:
<?php
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:<password>@127.0.0.1:10011/?server_port=9987&nickname=Chiripe[Time]");
$time = date("H:i");
while(1) {
$mychannel = $ts3_VirtualServer->channelGetById('22');
$mychannel["channel_name"] = "[cspacer]Время : $time";
[B]sleep(60);[/B]
}
?>
<17:42:28> "serveradmin from 127.0.0.1:60943" connected to channel "┏ Гостевая"
<17:42:28> "serveradmin from 127.0.0.1:60943" переименовался в "Chiripe[Time]"
<17:42:30> Канал "[cspacer]Время : 17:41" был переименован в "[cspacer]Время : 17:42" пользователем "Chiripe[Time]"
<17:42:30> "Chiripe[Time]" выброшен (connection lost)

and
throw the script datebot

Edit by mod: removed useless poll and wrapped code and log.
 
Last edited by a moderator:

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
PHP:
<?php
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://username:[email protected]:10011/?server_port=9987&nickname=BOT");
$time = date("H:i");
while(1) {
$mychannel = $ts3_VirtualServer->channelGetById('555');
$mychannel["channel_name"] = "Clock: $time";
sleep(60);
}

Work fine in my ts3. Whats errors see you ?
 

Mr-Malone

You risk and you will win
Sep 11, 2015
69
25
108
I'm having the same problem after sixty seconds bot loses connection with the server. What we can change the script as your bot to the updates at a certain time and to only fail?
 

cobryn

Member
Oct 16, 2015
3
1
38
Don't make with "sleep(60);" if u want to make a bot 24/24 7/7 you need to make a CRONJOB on a VPS Linux Server every 60 seconds, the Linux VPS Server will execuse php /var/www/script.php and rename the channel with the data =)
 

cobryn

Member
Oct 16, 2015
3
1
38
If anyone want, i can release my work ? The script update channel name every 60 seconds with the hours, (23h50 - 23h51 ...) .
 

vupyC

Member
Mar 2, 2016
29
0
36
how to do that
Don't make with "sleep(60);" if u want to make a bot 24/24 7/7 you need to make a CRONJOB on a VPS Linux Server every 60 seconds, the Linux VPS Server will execuse php /var/www/script.php and rename the channel with the data =)
 

cobryn

Member
Oct 16, 2015
3
1
38
On linux:
Code:
apt-get install cron

And after you need to put line where execute the script every 60 seconds.
 
Top