PDA

View Full Version : Viewer to display channel and its subchannels only


mooxe
25-10-2008, 20:10
Hey guys...

Looking for a small script that would only shows the people in a channel, and its subchannels. I did see one on here that may work with cyts libs on PHP4, tried it but did not work. It was a longshot anyways since I am using PHP5.

Thomas
25-10-2008, 20:23
As far as I know, PHP is downwardly compatible, so you can use this script with PHP 5 as well.

If you post the name of the script (or the script itsself would be better), we could help you a little bit more.

mooxe
25-10-2008, 21:38
From the thread... http://forum.teamspeak.com/showthread.php?t=35750&highlight=display+channel

<?
include 'cyts.class.php';
/* init CyTS library */
$cyts = new cyts();

/* connect to TeamSpeak server */
$cyts->connect('localhost', 51234, 8767);

/* find a channel named Shoutbox */
$channel = $cyts->info_getChannelByName('Shoutbox'); //it's retur ID without get ['id]

/* create a new array containing players in channel Shoutbox */
$players = array();
foreach($cyts->info_playerList() as $player)
{
if($player['c_id'] == $channel)
{
$players[] = $player;
echo $player[15];
echo "<br>";
}
}
?>

Thomas
25-10-2008, 23:04
CyTS is not a standard php library.

Did you install it on your system?

mooxe
25-10-2008, 23:45
I have cyts.class.php in the root folder where I am trying to execute the script. Maybe I a missing something? I simply copied that above code and made the proper changes to chanlist.php. Executing it only gives a blank white page. Am I doing it wrong?