zbalh
New Member
- Mar 4, 2017
- 6
- 0
- 16
how i can get the client avatar to show it in the website using teamspeak3 framework php
and i used many codes as,
but didn't work just showing me a white blank screen
and i used many codes as,
foreach ($ts3_VirtualServer->clientList() as $ts3_Client) {
if ($ts3_Client["client_type"] == 0 and $ts3_Client["connection_client_ip"] == getIp()) {
function avatarGetName($member) {
return new TeamSpeak3_Helper_String("/avatar_" . $member["client_base64HashClientUID"]);
}
function avatarDownload($member) {
$download = $member->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $member->avatarGetName());
$transfer = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"]);
return $transfer->download($download["ftkey"], $download["size"]);
}
$client = $ts3_VirtualServer->clientGetByName($ts3_Client);
$avatar = avatarDownload($client);
header("Content-Type: " . TeamSpeak3_Helper_Convert::imageMimeType($avatar));
echo $avatar;
}
}
but didn't work just showing me a white blank screen