Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: [IESKAU]Shoutcast serverio eteryje ir kokia daina grije script

Parašė Waldoss· 2011 Geg. 13 14:05:09
#3


//Radijos kodas:P su foto. Tinka <span style="border-bottom: 1px dotted black;">php</span>-fusion galite ir pakoreguoti :)
 
openside("Eteryje");
$server2 = "222.222.222.222"; //Radijos serverio IP
$server2port = "8888"; //Radijos portas
$server2pass = "slaptazodis"; //Radijos slaptazodis
 
$dateix = fsockopen("$server2", $server2port, &$errno, &$errstr);
if( !$dateix )
{
echo "<font face='Verdana' size='2' color='black'><b>Serveris ISJUNGTAS!<b/></font><br>";
fclose($dateix);
}
else
{
fputs($dateix,"GET /admin.cgi?pass=$server2pass&mode=viewxml HTTP/1.0rnUser-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT;)rnrn");
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];
 
//Foto nustatymai. Kas eteryje rodo foto
if($server2title == 'serveris') //ce rasyti kaip yra pasidares dj GENRE geriausia kad butu vienas zodis pvz serveris 
echo "<center><img src='komanda/serveris.gif' border='2' width='128' height='95'></center><br>";
 
 
 
if ($stream2status == "1")
{
//Kas eteryje
echo "<font face='Verdana' size='2' color='black'><center><b> $server2title</font></b></center><br><br>";
 
 
 
 
//Ka serveris groja
if ($pl2 =="")
{
echo "";
}
else
{
echo "<a href="";
echo "$pl2";
echo "" target="_blank"></a>";
}
//Was wird gespielt?
echo "<font face='Verdana' size='2'
<MARQUEE scrolldelay='1' SCROLLAMOUNT='1' onmouseover='this.stop()' onmouseout='this.start()' direction='left' height='20' width='170'>
$song2title</font></MARQUEE>";
echo "<font face='Verdana' size='3' color='red'>
<center><b>Klausytis:</b><br><a href='http://$server2:$server2port/listen.pls'><img src='images/Winamp2.png' border='0' width='50' height='50'> <a href='http://$server2:$server2port/listen.pls'><img src='images/w_m_p.png' border='0' width='50' height='50'></center>";
}
//Jeigu niekas nera prisijunges i etery :)
else
{
echo "<font face='Verdana' size='3' color='red'><center>Netransliuojama</font></center>
";
}
closeside();
 
//Tikiuosi si kodas kam nors pravers :) 


Turėtu veikti.

Redagavo Waldoss· 2011 Geg. 13 14:05:21