Autor Zpráva
pivna
Profil *
nevíte jak todle zprovoznit ?:-)
<?php
//Configuration
$scdef = "";
// ABOVE: Default station name to display when server or stream is down
$scip = "78.129.197.192"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = "29710"; // port of shoutcast server
$scpass = "heslo"; // password to shoutcast server

$refreshrate = "200"; // Script/Page refresh time
$bgcolor = "#ffffff"; // page background colour, hex value, default = white, #ffffff

//End configuration
//*********** PUT YOUR INFO HERE ***********//

$scfp = @fsockopen("$scip", $scport, &$errno, &$errstr, 5);
if(!$scfp) {
$scsuccs=1;
echo''.$scdef.'
<html>
<p align="center"> <img src="img/offline.png">
<div align="center"><span class="style">..ted nevysilam</span></div>
<p></p>
</body>

</html>';
}
if($scsuccs!=1){
fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}

######################################################################################################################
/////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//define xml elements
$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "MAXLISTENERS");
$y=0;
while($loop[$y]!=''){
$pageed = ereg_replace(".*<$loop[$y]>", "", $page);
$scphp = strtolower($loop[$y]);
$$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE)
$$scphp = urldecode($$scphp);

// uncomment the next line to see all variables
//echo'$'.$scphp.' = '.$$scphp.'<br>';
$y++;
}
//end intro xml elements
######################################################################################################################
######################################################################################################################
/////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//get song info and history
$pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
$pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
$songatime = explode("<SONG>", $pageed);
$r=1;
while($songatime[$r]!=""){
$t=$r-1;
$playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
$playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
$song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
$song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
$song[$t] = urldecode($song[$t]);
$dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
$dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
}
//end song info

fclose($scfp);
}

//display stats
if($streamstatus == "1"){
//you may edit the html below, make sure to keep variable intact
echo'

<html>
<head>
<p> &nbsp;&nbsp;&nbsp;<span class="song2">Právě hraje... </span>
<span class="song"><u>
<marquee width="100%" scrolldelay="100" scrollamount="5" vspace="50">
<div align="center">'.$song[0].' </div>
</marquee></p>
</u></span>

<br>
&nbsp;&nbsp;&nbsp;<span class="song2">Posluchači:</span><span class="song"> '.$currentlisteners.' / '.$maxlisteners.'</span><br>
&nbsp;&nbsp;&nbsp;<span class="song2">Kvalita:</span><span class="song"> '.$bitrate.'kbps</span><br>
<br>
&nbsp;&nbsp;&nbsp;<span class="song2">Historie: </span>
<ol>
<li>&nbsp;&nbsp;&nbsp;<span class="song">'.$song[1].'</span></li>
<li>&nbsp;&nbsp;&nbsp;<span class="song">'.$song[2].'</span></li>
<li>&nbsp;&nbsp;&nbsp;<span class="song">'.$song[3].'</span></li>
<li>&nbsp;&nbsp;&nbsp;<span class="song">'.$song[4].'</span></li>
<li>&nbsp;&nbsp;&nbsp;<span class="song">'.$song[5].'</span></li>
<li>&nbsp;&nbsp;&nbsp;<span class="song">'.$song[6].'</span></li>
</ol>
</body>
</html>';

}
if($streamstatus == "0")
{
//you may edit the html below, make sure to keep variable intact
echo'
<html>
<p align="center"> <img src="img/offline.png">
<div align="center"><span class="style">...ted nevysilam</span></div>
<p></p>
</body>

</html>';
}
?>

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: