tiro
Member
- Jun 6, 2016
- 27
- 4
- 43
- Thread starter
- #21
Not workingCode:require_once("libraries/TeamSpeak3/TeamSpeak3.php"); $ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:sadpass@ip:10011/?server_port=9987&blocking=0&nickname=NAME".mt_rand(1, 100)." LAST NAME"); $type = $desc = $namexuid =''; if (isset($_POST['change_desc'])) { $type = $_POST['type']; $desc = $_POST['desc']; $namexuid = $_POST['namexuid']; $changedesc = array("client_description=$desc"); if($type == "nick") { $client = $ts3_VirtualServer->clientGetByName($namexuid); $client->modify($changedesc);} else if ($type == "uid") { $client = $ts3_VirtualServer->clientGetByUid($namexuid); $client->modify($changedesc);} } echo"<form method='post'><br/> Search for client via <select name='type'> <option value='nick'>Nick</option> <option value='uid'>UID</option> </select><br/><br/> Name/UID: <input type='text' name='namexuid'><br/><br/> Description: <input type='text' name='desc'><br/><br/> <input type='submit' value='Change description' name='change_desc'> </form><br/>";