Simple & Clean Server Creator [Web]

kalle

high minded
Contributor
Oct 28, 2015
411
253
178
Github

Try with this. But this only choose random port between 12000 - 13000, but there is still chance that someone will hit same port, so this need to improve more.
 

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
$port = rand(12000,13000); -> Perfect.

---- Automatically Merged Double Post ----

$create_array = [

"virtualserver_name" => $servername,

"virtualserver_maxclients" => $slots,

"virtualserver_name_phonetic" => $realTime,

"virtualserver_hostbutton_tooltip" => "My Company",

"virtualserver_hostbutton_url" => "http://www.example.com",

"virtualserver_hostbutton_gfx_url" => "http://www.example.com/buttons/button01_24x24.jpg",
];

Dont put PORT VALUE and TS3 automatic do RANDOM port.


if($port){
$create_array = [

"virtualserver_name" => $servername,

"virtualserver_maxclients" => $slots,

"virtualserver_name_phonetic" => $realTime,

"virtualserver_port" => $port,

"virtualserver_hostbutton_tooltip" => "My Company",

"virtualserver_hostbutton_url" => "http://www.example.com",

"virtualserver_hostbutton_gfx_url" => "http://www.example.com/buttons/button01_24x24.jpg",
]; }
else{
$create_array = [

"virtualserver_name" => $servername,

"virtualserver_maxclients" => $slots,

"virtualserver_name_phonetic" => $realTime,

"virtualserver_hostbutton_tooltip" => "My Company",

"virtualserver_hostbutton_url" => "http://www.example.com",

"virtualserver_hostbutton_gfx_url" => "http://www.example.com/buttons/button01_24x24.jpg",
];
}
 
Last edited:

mkll11one

ServerGeek
VIP
Apr 26, 2016
262
136
157
Thanks you! you both! :D @kalle & @EscuderoKevin

One question about the ts3server connect (of link)

---- Automatically Merged Double Post ----

for this.

ts3server://127.0.0.1?port=".$port."&token=".$token."

EX:
PHP:
        $port= $nsv['virtualserver_port'];
        $token = $nsv['token'];
        $link = "ts3server://127.0.0.1?port=".$port."&token=".$token."";

Then in button you need do that

<a href="<?php echo $link ?>" style="text-decoration: none;"><div style="width:200px; height:30px; border-radius:10px; background-color:#a00;"><font color="#fff" style="font-size:15px;" face="ShikFont">connect</font></div></a>
-- Where can this be placed?
I did try this:
Code:
<?php
        $port= $nsv['virtualserver_port'];
        $token = $nsv['token'];
        $link = "ts3server://127.0.0.1?port=".$port."&token=".$token."";
<?
But seems wrongly.
 
Last edited:

bercinew

Member
Aug 16, 2017
35
4
43
Hi guys!

I have a short question, about PHP, when I try to load in the site, it says "<my ip> is currently unable to handle this request.HTTP ERROR 500"

What can I do? :)
 

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
Hi guys!

I have a short question, about PHP, when I try to load in the site, it says "<my ip> is currently unable to handle this request.HTTP ERROR 500"

What can I do? :)
check the error logs to find the issue. if you can't just post them here.
 
May 14, 2016
3
0
33
Code:
[Wed Aug 08 05:25:59.250996 2018] [:error] [pid 7992] [client 37.201.210.111:55789] PHP Fatal error:  Uncaught exception 'TeamSpeak3_Transport_Exception' with message 'Connection refused' in /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Transport/TCP.php:54\nStack trace:\n#0 /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Transport/TCP.php(108): TeamSpeak3_Transport_TCP->connect()\n#1 /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Adapter/ServerQuery.php(76): TeamSpeak3_Transport_TCP->readLine()\n#2 /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Adapter/Abstract.php(60): TeamSpeak3_Adapter_ServerQuery->syn()\n#3 /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/TeamSpeak3.php(320): TeamSpeak3_Adapter_Abstract->__construct(Array)\n#4 /var/www/html/servercreatorTS3-master/index.php(8): TeamSpeak3::factory('serverquery://s...')\n#5 {main}\n  thrown in /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Transport/TCP.php on line 54


MOD EDIT: Learn to use the message options.
 
Last edited by a moderator:

kalle

high minded
Contributor
Oct 28, 2015
411
253
178
Code:
[Wed Aug 08 05:25:59.250996 2018] [:error] [pid 7992] [client 37.201.210.111:55789] PHP Fatal error:  Uncaught exception 'TeamSpeak3_Transport_Exception' with message 'Connection refused' in /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Transport/TCP.php:54\nStack trace:\n#0 /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Transport/TCP.php(108): TeamSpeak3_Transport_TCP->connect()\n#1 /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Adapter/ServerQuery.php(76): TeamSpeak3_Transport_TCP->readLine()\n#2 /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Adapter/Abstract.php(60): TeamSpeak3_Adapter_ServerQuery->syn()\n#3 /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/TeamSpeak3.php(320): TeamSpeak3_Adapter_Abstract->__construct(Array)\n#4 /var/www/html/servercreatorTS3-master/index.php(8): TeamSpeak3::factory('serverquery://s...')\n#5 {main}\n  thrown in /var/www/html/servercreatorTS3-master/libraries/TeamSpeak3/Transport/TCP.php on line 54


MOD EDIT: Learn to use the message options.
Whitelist your web ip.
 

moohook

New Member
Nov 30, 2017
1
1
18
Fatal error: Uncaught TeamSpeak3_Transport_Exception: Connection refused in /home/shortear/myupload.io/libraries/TeamSpeak3/Transport/TCP.php:55 Stack trace: #0 /home/shortear/myupload.io/libraries/TeamSpeak3/Transport/TCP.php(141): TeamSpeak3_Transport_TCP->connect() #1 /home/shortear/myupload.io/libraries/TeamSpeak3/Adapter/ServerQuery.php(73): TeamSpeak3_Transport_TCP->readLine() #2 /home/shortear/myupload.io/libraries/TeamSpeak3/Adapter/Abstract.php(57): TeamSpeak3_Adapter_ServerQuery->syn() #3 /home/shortear/myupload.io/libraries/TeamSpeak3/TeamSpeak3.php(338): TeamSpeak3_Adapter_Abstract->__construct(Array) #4 /home/shortear/myupload.io/index.php(7): TeamSpeak3::factory(Object(TeamSpeak3_Helper_Uri)) #5 {main} thrown in /home/shortear/myupload.io/libraries/TeamSpeak3/Transport/TCP.php on line 55
 

BIOS

Knowledge Seeker
VIP
Oct 10, 2015
447
848
208
Fatal error: Uncaught TeamSpeak3_Transport_Exception: Connection refused in /home/shortear/myupload.io/libraries/TeamSpeak3/Transport/TCP.php:55 Stack trace: #0 /home/shortear/myupload.io/libraries/TeamSpeak3/Transport/TCP.php(141): TeamSpeak3_Transport_TCP->connect() #1 /home/shortear/myupload.io/libraries/TeamSpeak3/Adapter/ServerQuery.php(73): TeamSpeak3_Transport_TCP->readLine() #2 /home/shortear/myupload.io/libraries/TeamSpeak3/Adapter/Abstract.php(57): TeamSpeak3_Adapter_ServerQuery->syn() #3 /home/shortear/myupload.io/libraries/TeamSpeak3/TeamSpeak3.php(338): TeamSpeak3_Adapter_Abstract->__construct(Array) #4 /home/shortear/myupload.io/index.php(7): TeamSpeak3::factory(Object(TeamSpeak3_Helper_Uri)) #5 {main} thrown in /home/shortear/myupload.io/libraries/TeamSpeak3/Transport/TCP.php on line 55

update ts3php framework
 
Top