• VIP content is now being released for free. Consider this an early Christmas gift! We have decided to do this for anyone poor and unable to afford VIP membership.

Simple & Clean Server Creator [Web]

kalle

high minded
Contributor
Member
Messages
270
Likes
127
Points
68
You do not have permission to view link Log in or register now.


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

Restricted
Member
Messages
466
Likes
179
Points
55
$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

Restricted
Member of the Month
VIP
Member
Messages
190
Likes
45
Points
39
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:
Messages
37
Likes
5
Points
8
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
Messages
1,998
Likes
1,954
Points
191
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.
 
Messages
3
Likes
0
Points
1
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
Member
Messages
270
Likes
127
Points
68
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.
 

Top