PHP Generate Token ( Admin Server Query )

Status
Not open for further replies.

freets3.ovh

Active Member
Sep 19, 2015
150
105
85
Hello everyone,

I need some help to finish my panel.

I have a small problem to generate a token, to generate a token Server Admin, it works, but for server group ( Admin Server Query ) this is no working.

Im use :

PHP:
<?php
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
require_once("settings.php");
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://".$login_name.":".$login_password."@".$ip.":".$query_port."/?server_port=".$virtualserver_port."");

// grab TeamSpeak3_Node_Servergroup object
$group = $ts3_VirtualServer->serverGroupGetByName("Server Admin");

// create privilege key
$key = $group->privilegeKeyCreate();

echo "Token : "; echo $key . "";
?>
$group = $ts3_VirtualServer->serverGroupGetByName("Server Admin"); Working
$group = $ts3_VirtualServer->serverGroupGetByName("Admin Server Query"); No working

Can you help me please, big ty :)
 
Last edited by a moderator:

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,855
381
Hello everyone,

I need some help to finish my panel.

I have a small problem to generate a token, to generate a token Server Admin, it works, but for server group ( Admin Server Query ) this is no working.

Im use :

PHP:
<?php
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
require_once("settings.php");
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://".$login_name.":".$login_password."@".$ip.":".$query_port."/?server_port=".$virtualserver_port."");

// grab TeamSpeak3_Node_Servergroup object
$group = $ts3_VirtualServer->serverGroupGetByName("Server Admin");

// create privilege key
$key = $group->privilegeKeyCreate();

echo "Token : "; echo $key . "";
?>
$group = $ts3_VirtualServer->serverGroupGetByName("Server Admin"); Working
$group = $ts3_VirtualServer->serverGroupGetByName("Admin Server Query"); No working

Can you help me please, big ty :)
All these type of codes, as i know are able to be used for all server groups except templates and queries!
 
Last edited:
Status
Not open for further replies.
Top