Simple & Clean Server Creator [Web]

kalle

high minded
VIP
Contributor
Joined
Oct 28, 2015
Messages
350
Points
118
Location
Bosnia and Herzegovina
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

Active Member
Joined
Jul 2, 2015
Messages
369
Points
90
Age
26
Location
Argentina
$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

Active Member
Joined
Apr 26, 2016
Messages
189
Points
74
Age
26
Location
Denmark, Copenhagen
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

New Member
Joined
Aug 16, 2017
Messages
35
Points
23
Age
16
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
Joined
Mar 31, 2016
Messages
2,047
Points
326
Age
25
Location
Greece
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.
 
Joined
May 14, 2016
Messages
3
Points
33
Age
41
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
VIP
Contributor
Joined
Oct 28, 2015
Messages
350
Points
118
Location
Bosnia and Herzegovina
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
Joined
Nov 30, 2017
Messages
1
Points
18
Age
22
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
Joined
Oct 10, 2015
Messages
378
Points
168
Age
29
Location
Germany
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