I know i could do that, but i need it to be automatic, so if i add a new servergroup i don't have to manually do it.You could make a folder called: icons and put all icons on it like member.png ...
And make: if in array..... etc.
if he's have a server group called (Member) you should make echo "<img src="member.png"></img>"
I happy that's you want.
If you didn't know & need help come PM.
http://yat.qa/download/Hey there, i'm doing a script that shows the client thier own servergroups that's assigned to them, i have their uuid, database id, servergroups id(s) inside an array, the problem is how to get the actual icons? or how to download it to a certain directory.
Yea i know about that, but my main point is how to make it automatically so if i made a new servergruop it'll automatically get it's icon.http://yat.qa/download/
https://www.virustotal.com/de/file/...6c9f3cef38bebb5b040ca55f/analysis/1488031162/
Login to your server, go to "Miscellaneous" and click "Icons". You can export all icons there
Exactly but how to use it though...I assume you're using php? If so this should help you -> https://docs.planetteamspeak.com/ts...rgroup.html#a9594562da058833147c1139c0d240b93
Exactly but how to use it though...
header('Content-type: image/png');
echo $virtualServer->serverGroupGetById(6)->iconDownload();
Great! That works, Now i'm confused on how to display multiple icons and not just one, also place those icons within a normal html site, all using this method. But is it possible?Code:header('Content-type: image/png'); echo $virtualServer->serverGroupGetById(6)->iconDownload();
I tried that out... But the result was terribleMaybe you can try with foreach. I didn't tested it but it may work.
From PHP.NET:
<?php
$arr = array(1, 2, 3, 4);
foreach ($arr as $value) {
echo $virtualServer->serverGroupGetById($value)->iconDownload()
}
?>
Let me clear things up a little bit, firstly my script is getting the connected client information such as their UUID, servergroups, etc.. i have a function that's does: foreach value(sgid) which is in an array ( servergroups array ), now the step that's more important is.. how to display those icons within the html/php page itself so the client could view their servergroups icons, i know that i could store those icons in a directory manually, but i want to make it that it get's the icons automatically even if you make a new servergroup. the thing is i'm confused on how to actually display those icons without having to put image header. but i want it within an actual html/php page that displays the client's username, and their servergroups..You can make it like This: yourdomain.com/icon.php?id=The ID Of the servergroup With $_GET['id'];
Tutorial $_GET: https://www.w3schools.com/php/php_forms.asp
Why wouldn't you use @SpeciaL's idea?Okay, for now i'm going to stick with putting it manually, but i still hope to find a solution for making it automatically get icons.
<img src="yourdomain.com/icon.php?id=<?php echo $groupID; ?>">
header('Content-type: image/png');
echo $virtualServer->serverGroupGetById($_GET['id'])->iconDownload();
So i created a new file to get the icon using the $_GET and the first method, then in a function i turned the file into a URi since i didn't know how to implement the image without displaying the _GET param...Why wouldn't you use @SpeciaL's idea?
Code:<img src="yourdomain.com/icon.php?id=<?php echo $groupID; ?>">
While icon php does this:
Code:header('Content-type: image/png'); echo $virtualServer->serverGroupGetById($_GET['id'])->iconDownload();
One last question though, is there a way to get every single servergroup id and put it in an array?
$sGroups = $ts3Server->servergroupList();
foreach($sGroups as $group)
{
echo $group['sgid'];
}