Help With This Script

Dec 19, 2015
114
15
53
Inappropriate thread title.
Hello R4p3

I'm Making TeamSpeak 3 Panel And I'm Trying To Make Make Server From Website I'm Using The Script Down But Its Not Working If You can Help Me with Fixing It I Will Appreciate it.

PHP:
<?php
// load framework files
require_once("settings.php");
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
// connect to local server, authenticate and spawn an object for the server instance
      $ts3_ServerInstance = TeamSpeak3::factory("serverquery://".$login_name.":".$login_password."@".$ip.":".$query_port."/?server_port=".$virtualserver_port."");

// create a virtual server and get its ID
if(isset($_POST['button']))
  {
  $rSNAME= $_POST["sname"];
  $vTOOLTIP = $_POST["tooltip"];
  $vURL = $_POST["url"];
  $vGFXURL = $_POST["gfxurl"];
$new_sid = $ts3_ServerInstance->serverCreate(array(
 "virtualserver_name" => $rSNAME,
 "virtualserver_maxclients" => 10,
 "virtualserver_hostbutton_tooltip" => $vTOOLTIP,
 "virtualserver_hostbutton_url" => $vURL,
 "virtualserver_hostbutton_gfx_url" => $vGFXURL,
));
  }
?>
<style>
input[type=text], select {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type=submit] {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: #45a049;
}

div {
    border-radius: 5px;
    background-color: #f2f2f2;
    padding: 40px;
}
</style>
<body>
<html>
    <title>TeamSpeak3 Control Panel</title>
<center>
<form method="POST">
<div>
<h1>Create Virtual Server</h1>
    <label for="fname">Server Name</label>
    <input type="text" id="fname" name="sname">
    <label for="sname">ToolTip</label>
    <input type="text" id="tooltip" name="tooltip">
    <label for="tooltip">URL</label>
    <input type="text" id="url" name="url">
    <label for="url">GFXURL</label>
    <input type="text" id="gfxurl" name="gfxurl">
      <input type="submit" value="Create Server" name = "button">
</div>
  </center>
  </html>
 

MadKill

Active Member
Sep 1, 2015
190
47
66
PHP:
<?php
// load framework files

require_once("libraries/TeamSpeak3.php");
// connect to local server, authenticate and spawn an object for the server instance
$ts3_ServerInstance = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=9987&blocking=0&nickname=[teste]".mt_rand(1, 100)."Create");

// create a virtual server and get its ID
if(isset($_POST['button']))
  {
  $rSNAME= $_POST["sname"];
  $vTOOLTIP = $_POST["tooltip"];
  $vURL = $_POST["url"];
  $vGFXURL = $_POST["gfxurl"];
 
    $ts3_ServerInstance->serverCreate(array(
 "virtualserver_name" => $rSNAME,
 "virtualserver_maxclients" => 10,
 "virtualserver_hostbutton_tooltip" => $vTOOLTIP,
 "virtualserver_hostbutton_url" => $vURL,
 "virtualserver_hostbutton_gfx_url" => $vGFXURL
));
  }
?>
<style>
input[type=text], select {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type=submit] {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: #45a049;
}

div {
    border-radius: 5px;
    background-color: #f2f2f2;
    padding: 40px;
}
</style>
<body>
<html>
    <title>TeamSpeak3 Control Panel</title>
<center>
<form method="POST">
<div>
<h1>Create Virtual Server</h1>
    <label for="fname">Server Name</label>
    <input type="text" id="fname" name="sname">
    <label for="sname">ToolTip</label>
    <input type="text" id="tooltip" name="tooltip">
    <label for="tooltip">URL</label>
    <input type="text" id="url" name="url">
    <label for="url">GFXURL</label>
    <input type="text" id="gfxurl" name="gfxurl">
      <input type="submit" value="Create Server" name = "button">
</div>
  </center>
  </html>

Try
 
Dec 19, 2015
114
15
53
PHP:
<?php
// load framework files

require_once("libraries/TeamSpeak3.php");
// connect to local server, authenticate and spawn an object for the server instance
$ts3_ServerInstance = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=9987&blocking=0&nickname=[teste]".mt_rand(1, 100)."Create");

// create a virtual server and get its ID
if(isset($_POST['button']))
  {
  $rSNAME= $_POST["sname"];
  $vTOOLTIP = $_POST["tooltip"];
  $vURL = $_POST["url"];
  $vGFXURL = $_POST["gfxurl"];
 
    $ts3_ServerInstance->serverCreate(array(
 "virtualserver_name" => $rSNAME,
 "virtualserver_maxclients" => 10,
 "virtualserver_hostbutton_tooltip" => $vTOOLTIP,
 "virtualserver_hostbutton_url" => $vURL,
 "virtualserver_hostbutton_gfx_url" => $vGFXURL
));
  }
?>
<style>
input[type=text], select {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type=submit] {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: #45a049;
}

div {
    border-radius: 5px;
    background-color: #f2f2f2;
    padding: 40px;
}
</style>
<body>
<html>
    <title>TeamSpeak3 Control Panel</title>
<center>
<form method="POST">
<div>
<h1>Create Virtual Server</h1>
    <label for="fname">Server Name</label>
    <input type="text" id="fname" name="sname">
    <label for="sname">ToolTip</label>
    <input type="text" id="tooltip" name="tooltip">
    <label for="tooltip">URL</label>
    <input type="text" id="url" name="url">
    <label for="url">GFXURL</label>
    <input type="text" id="gfxurl" name="gfxurl">
      <input type="submit" value="Create Server" name = "button">
</div>
  </center>
  </html>

Try

It Doesn't Work It Show The Error Blow

http://imgur.com/a/8wwdq
 

MadKill

Active Member
Sep 1, 2015
190
47
66
lol... you have licence on your teamspeak3? virtualserver limit reached ....
 
Top