Hey Guys, is there anyone who can help me in making this code functional?
I just want to have a script on my webspace, which users can Click and they get something like
Your Token is been generated.
Token:
PHP:
<?php
require_once('libraries/TeamSpeak3/TeamSpeak3.php');
$server = array(
"tsip" => "localhost",
"tsport" => "9987",
"ts_query_admin" => "serveradmin",
"ts_query_password" => "",
"ts_query_port" => "10011",
"ts_query_user_nick" => "trolbob"
);
try {
TeamSpeak3::init();
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://".$server["ts_query_admin"].":".$server["ts_query_password"]."@".$server["tsip"].":".$server["ts_query_port"]."/?server_port=".$server["tsport"]."&nickname=".$server["ts_query_user_nick"]."");
$token = $ts3_VirtualServer->tokenCreate ( TeamSpeak3::TOKEN_SERVERGROUP, $sgID ); // sgID = ID der Servergruppe
echo $token;
} catch(Exception $e) {
echo "Fehler!<br/>ErrorID: <b>". $e->getCode() ."</b>; Error Message: <b>". $e->getMessage() ."</b>;";
}
?>
I just want to have a script on my webspace, which users can Click and they get something like
Your Token is been generated.
Token:
Last edited by a moderator: