Advertisement
Guest User

Untitled

a guest
Jun 14th, 2013
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. <link href='http://fonts.googleapis.com/css?family=Merriweather+Sans:400,700' rel='stylesheet' type='text/css'>
  2. <style type="text/css">
  3. p { font-family: 'Merriweather Sans', sans-serif; font-weight: 400; }
  4. b { font-family: 'Merriweather Sans', sans-serif; font-weight: 700; }
  5. </style>
  6. <center>
  7.  
  8. <?php header("Refresh: 10")>
  9.  
  10. //Display IceCast Server Stats
  11.  
  12. $server = "direct.x86cam.com"; //IP (x.x.x.x or domain name)
  13. $iceport = "8000"; //Port
  14. $iceurl = "stream.mp3"; //Mountpoint
  15. $online = "<font color=green><b>ONLINE</b> </font><br />";
  16. $offline = "<font color=red><b>OFFLINE</b></font><br />";
  17.  
  18. if($fp = @fsockopen($server, $iceport, $errno, $errstr, '1')) {
  19. fclose($fp);
  20. $ice_status=$online;
  21. echo "<font color=#999999><p><b>Stream Status:</b> $ice_status";
  22. $stats = file("http://" . $server . ":" . $iceport . "/status2.xsl");
  23. // $status = //explode(",", $stats[5]);
  24. // $artist = //explode("-", $status[5]);
  25. $status = explode(",", $stats[5]);
  26. $artist = substr($status[5], 3); //remove '-'
  27. echo "" . $artist;
  28.  
  29.  
  30. // echo "<b>Artist:</b> " . $artist[1];
  31. // echo "<b>Song:</b> " . $artist[2];
  32. echo "<br />";
  33. echo "<b>Listeners:</b> <b> " . $status[3] . "</b></font>";
  34. echo "</p>";
  35. //echo "<br />";
  36. //echo "<p><a href=http://" . $server . ":" . $iceport . "/" . $iceurl . " target=new><b>Listen!</b></a></p>";
  37.  
  38. } else {
  39.  
  40. $ice_status=$offline;
  41. echo "<p><b>Stream Status:</b> $ice_status";
  42. }
  43.  
  44. ?>
  45. <hr />
  46. </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement