Simple & Clean Server Creator [Web]

mkll11one

ServerGeek
VIP
Joined
Apr 26, 2016
Messages
262
Reaction score
137
Points
157
Hi @EscuderoKevin Is it possible to set a "random port" to creating, without to enter the port? - As example: 12000-13000?
 

kalle

high minded
Contributor
Joined
Oct 28, 2015
Messages
411
Reaction score
253
Points
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
Joined
Jul 2, 2015
Messages
380
Reaction score
181
Points
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
Joined
Apr 26, 2016
Messages
262
Reaction score
137
Points
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:

kalle

high minded
Contributor
Joined
Oct 28, 2015
Messages
411
Reaction score
253
Points
178
Nvm, mistypes always happens. Happy to get it working. :)
 

bercinew

Member
Joined
Aug 16, 2017
Messages
35
Reaction score
4
Points
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
Joined
Mar 31, 2016
Messages
2,570
Solutions
12
Reaction score
2,857
Points
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.
 
Joined
May 14, 2016
Messages
3
Reaction score
0
Points
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
Joined
Oct 28, 2015
Messages
411
Reaction score
253
Points
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.
 

kalle

high minded
Contributor
Joined
Oct 28, 2015
Messages
411
Reaction score
253
Points
178
Check error logs man, its written here 100x alredy. -.-
 

moohook

New Member
Joined
Nov 30, 2017
Messages
1
Reaction score
1
Points
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
Joined
Oct 10, 2015
Messages
447
Reaction score
848
Points
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