Sveiki gal kas galetu sukoduoti Radijos panele IceCast2
openside("Radijas");
$server2 = "IP"; //IP des Shoutcast Servers
$server2port = "PORT"; //Port des Shoutcast Server - Bsp.: 8000
$server2pass = "PASSWORD"; //Passwort des Shoutcast Servers
$dateix = fsockopen("$server2", $server2port, &$errno, &$errstr);
if( !$dateix )
{
echo "<font face='Verdana' size='2' color='black'><b>DOWN<b/></font><br>";
fclose($dateix);
}
else
{
fputs($dateix,"GET /admin.cgi?pass=$server2pass&mode=viewxml HTTP/1.0\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT;)\r\n\r\n");
while (!(feof($dateix)))
{
$zeilex .= fgets($dateix, 4096);
}
fclose($dateix);
}
$tmpx = explode("<CURRENTLISTENERS>", $zeilex);
$tmpx = explode("</CURRENTLISTENERS>", $tmpx[1]);
$server2lauscher = $tmpx[0];
$pl2 = " ";
$tmpx = explode("<SERVERGENRE>", $tmpx[1]);
$tmpx = explode("</SERVERGENRE>", $tmpx[1]);
$tmp2x = explode("+", $tmpx[0]);
$nick2 = $tmp2x[0];
if(count($tmp2x) == 2)
$pl2 = $tmp2x[1];
$tmpx = explode("<SERVERTITLE>", $tmpx[1]);
$tmpx = explode("</SERVERTITLE>", $tmpx[1]);
$server2title = $tmpx[0];
$tmpx = explode("<SONGTITLE>", $tmpx[1]);
$tmpx = explode("</SONGTITLE>", $tmpx[1]);
$song2title = $tmpx[0];
$tmpx = explode("<STREAMSTATUS>", $tmpx[1]);
$tmpx = explode("</STREAMSTATUS>", $tmpx[1]);
$stream2status = $tmpx[0];
if ($stream2status == "1")
{
//OnAir? Dann das hier:
echo "<font face='Verdana' size='4' color='black'><b>Eteryje:</b></font><br>";
//Welcher Moderator?
echo "<font face='Verdana' size='2' color='orange'><b>Laida</b>:<br> $nick2</font><br>";
//Playlist vorhanden?
if ($pl2 =="")
{
echo "";
}
else
{
echo "<a href=\"";
echo "$pl2";
echo "\" target=\"_blank\"></a>";
}
//Was wird gespielt?
echo "<font face='Verdana' size='2' color='orange'><b>Daina:</b><br>$song2title</font><br>";
echo "<font face='Verdana' size='3' color='green'$server <br><a href=\"http://$server2:$server2port/listen.pls\"><b>Klausyti</b></a></font>";
}
//Offair? Dann hier das:
else
{
echo "<font face='Verdana' size='3' color='red'><center>Netransliuojama</font></center>";
}
closeside();
Sita netinka, nes cia Shutcast'ui..
Manau ne vienas zmogus sito iesko..
|