Is this what you are looking for?hi @Kieran thanks for your answer, i would like to show the admin Token ( for get serveradmin group ) on my web panel. I can creat one with my panel but i can't see if others are avalaible to use.
I would like to show them on array list php script
Thank you
Is this what you are looking for?
I don't know what framework you're using but this should display all tokens if the query has enough permissions
https://docs.planetteamspeak.com/ts...server.html#a7dba6873e26fbac8c6d994a06232891b
Okay, good luck. I will try to help if there are problemsyes i'm looking for install this option on my own panel ^^
I will try it this night, i'm at the office and i don't have my laptop.
Thanks for your answer, i will try to install it.
@Kieran
I think i will need your help to put it on my website ^^
I'm in for 4 hours, nearly i crush my head on the laptop x)
<?php
require_once("./TeamSpeak3/TeamSpeak3.php");
$config = array(); //Creates Config Array
$config["Username"] = "login"; //Query Login
$config["Password"] = "passowrd"; //Query Password
$config["IP"] = "1.1.1.1"; //Server IP/Domain
$config["Port"] = "9987"; //Server Port
$config["qPort"] = "10011"; // Query Port, Default 10011
$config["Nickname"] = rawurlencode("Query".rand(1,99)); // Convertes Botname to a URI friendly Format
function print_r2($val){
echo '<pre>';
print_r($val);
echo '</pre>';
}
try{
$ts3 = TeamSpeak3::factory("serverquery://" . $config["Username"] . ":" . $config["Password"] . "@" . $config["IP"] . ":" . $config["qPort"] . "/?server_port=" . $config["Port"] . "");
$tokens = $ts3->privilegeKeyList();
print_r2($tokens);
}
catch(TeamSpeak3_Exception $error)
{
// print the error message returned by the server
echo "Error " . $error->getCode() . ": " . $error->getMessage();
}
?>
foreach($tokens as $token){
echo $token['token_id1'] . " " . $token['token'];
}
function print_r2($val){
echo '<pre>';
print_r($val);
echo '</pre>';
}
try{
$ts3 = TeamSpeak3::factory("serverquery://" . $config["Username"] . ":" . $config["Password"] . "@" . $config["IP"] . ":" . $config["qPort"] . "/?server_port=" . $config["Port"] . "");
$tokens = $ts3->privilegeKeyList(true);
print_r2($tokens);
}
catch(TeamSpeak3_Exception $error)
{
// print the error message returned by the server
echo "No token avalaible " . $error->getCode() . ": " . $error->getMessage();
}
?>
Sorry, change it to this:i don't understand the second part of your solution
Code:function print_r2($val){ echo '<pre>'; print_r($val); echo '</pre>'; } try{ $ts3 = TeamSpeak3::factory("serverquery://" . $config["Username"] . ":" . $config["Password"] . "@" . $config["IP"] . ":" . $config["qPort"] . "/?server_port=" . $config["Port"] . ""); $tokens = $ts3->privilegeKeyList(true); print_r2($tokens); } catch(TeamSpeak3_Exception $error) { // print the error message returned by the server echo "No token avalaible " . $error->getCode() . ": " . $error->getMessage(); } ?>
witch part i'v to change ? ty @Kieran
<?php
require_once("./TeamSpeak3/TeamSpeak3.php");
$config = array(); //Creates Config Array
$config["Username"] = "login"; //Query Login
$config["Password"] = "passowrd"; //Query Password
$config["IP"] = "1.1.1.1"; //Server IP/Domain
$config["Port"] = "9987"; //Server Port
$config["qPort"] = "10011"; // Query Port, Default 10011
$config["Nickname"] = rawurlencode("Query".rand(1,99)); // Convertes Botname to a URI friendly Format
try{
$ts3 = TeamSpeak3::factory("serverquery://" . $config["Username"] . ":" . $config["Password"] . "@" . $config["IP"] . ":" . $config["qPort"] . "/?server_port=" . $config["Port"] . "");
$tokens = $ts3->privilegeKeyList(true);
foreach($tokens as $token){
echo $token['token_id1'] . " " . $token['token'];
}
}
catch(TeamSpeak3_Exception $error)
{
// print the error message returned by the server
echo "Error " . $error->getCode() . ": " . $error->getMessage();
}
?>
Yes. "Server Admin kdPLaOEv1bCOc7HEK" means "[Group you will get when token is used] [token you have to use]"
You mean in a table?@Kieran its possible to order it ? because isn't really design![]()
Okay just putYup because you can't read it when there is many keys; thanks you so mutch for your support you are ansome
<?php
require_once("./TeamSpeak3/TeamSpeak3.php");
echo "<style>table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%;}td, th { border: 1px solid #dddddd; text-align: left; padding: 8px;}tr:nth-child(even) { background-color: #dddddd;}</style>"; //HTML for table
$config = array(); //Creates Config Array
$config["Username"] = "login"; //Query Login
$config["Password"] = "passowrd"; //Query Password
$config["IP"] = "1.1.1.1"; //Server IP/Domain
$config["Port"] = "9987"; //Server Port
$config["qPort"] = "10011"; // Query Port, Default 10011
$config["Nickname"] = rawurlencode("Query".rand(1,99)); // Convertes Botname to a URI friendly Format
try{
$ts3 = TeamSpeak3::factory("serverquery://" . $config["Username"] . ":" . $config["Password"] . "@" . $config["IP"] . ":" . $config["qPort"] . "/?server_port=" . $config["Port"] . "");
$tokens = $ts3->privilegeKeyList(true);
echo "<table><tr><th>Group</th><th>Token</th></tr>";
foreach($tokens as $token){
echo "<tr><td>" . $token['token_id1'] . "</td><td>" . $token['token'] . "</td></tr>";
}
echo "</table>";
}
catch(TeamSpeak3_Exception $error)
{
// print the error message returned by the server
echo "Error " . $error->getCode() . ": " . $error->getMessage();
}
?>
No problem. Have funProblem solved, thanks you so mutch budy @Kieran <3