Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link href='http://fonts.googleapis.com/css?family=Merriweather+Sans:400,700' rel='stylesheet' type='text/css'>
- <style type="text/css">
- p { font-family: 'Merriweather Sans', sans-serif; font-weight: 400; }
- b { font-family: 'Merriweather Sans', sans-serif; font-weight: 700; }
- </style>
- <center>
- <?php header("Refresh: 10")>
- //Display IceCast Server Stats
- $server = "direct.x86cam.com"; //IP (x.x.x.x or domain name)
- $iceport = "8000"; //Port
- $iceurl = "stream.mp3"; //Mountpoint
- $online = "<font color=green><b>ONLINE</b> </font><br />";
- $offline = "<font color=red><b>OFFLINE</b></font><br />";
- if($fp = @fsockopen($server, $iceport, $errno, $errstr, '1')) {
- fclose($fp);
- $ice_status=$online;
- echo "<font color=#999999><p><b>Stream Status:</b> $ice_status";
- $stats = file("http://" . $server . ":" . $iceport . "/status2.xsl");
- // $status = //explode(",", $stats[5]);
- // $artist = //explode("-", $status[5]);
- $status = explode(",", $stats[5]);
- $artist = substr($status[5], 3); //remove '-'
- echo "" . $artist;
- // echo "<b>Artist:</b> " . $artist[1];
- // echo "<b>Song:</b> " . $artist[2];
- echo "<br />";
- echo "<b>Listeners:</b> <b> " . $status[3] . "</b></font>";
- echo "</p>";
- //echo "<br />";
- //echo "<p><a href=http://" . $server . ":" . $iceport . "/" . $iceurl . " target=new><b>Listen!</b></a></p>";
- } else {
- $ice_status=$offline;
- echo "<p><b>Stream Status:</b> $ice_status";
- }
- ?>
- <hr />
- </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement