Muntadher Safaa
Member
- 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.
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>