<?php
require_once("libraries/TeamSpeak3/TeamSpeak3.php");
try
{
//Your nickname
$name = "TeamSpeakUser";
//connect to server
$uri = "serverquery://serveradmin:[email protected]:10011/?server_port=9987&blocking=0";
$ts3 = TeamSpeak3::factory($uri);
$info = $ts3->clientGetByName($name)->getInfo();
echo $info["client_myteamspeak_id"];
}
catch(TeamSpeak3_Exception $e)
{
echo "Error " . $e->getCode() . ": " . $e->getMessage();
}
?>
PHP:<?php require_once("libraries/TeamSpeak3/TeamSpeak3.php"); try { //Your nickname $name = "TeamSpeakUser"; //connect to server $uri = "serverquery://serveradmin:[email protected]:10011/?server_port=9987&blocking=0"; $ts3 = TeamSpeak3::factory($uri); $info = $ts3->clientGetByName($name)->getInfo(); echo $info["client_myteamspeak_id"]; } catch(TeamSpeak3_Exception $e) { echo "Error " . $e->getCode() . ": " . $e->getMessage(); } ?>