Advertisement
marcelo1122

tocando agora

Jul 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. <style type="text/css">
  2. body,td,th {
  3. font-family: "Century Gothic";
  4. font-size: 12px;
  5. }
  6. </style>
  7. <meta http-equiv="refresh" content="15"/>
  8. <?php
  9. /*
  10.  
  11. Now Playing PHP script for SHOUTcast
  12.  
  13. This script is (C) MixStream.net 2008
  14.  
  15. Feel free to modify this free script
  16. in any other way to suit your needs.
  17.  
  18. Version: v1.1
  19.  
  20. */
  21.  
  22.  
  23. /* ----------- Server configuration ---------- */
  24.  
  25. $ip = "IP_DA_SUA_RADIO";
  26. $port = "PORTA";
  27.  
  28. /* ----- No need to edit below this line ----- */
  29. /* ------------------------------------------- */
  30. $fp = @fsockopen($ip,$port,$errno,$errstr,1);
  31. if (!$fp)
  32. {
  33. echo "Servidor Offline"; // Diaplays when sever is offline
  34. }
  35. else
  36. {
  37. fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
  38. while (!feof($fp))
  39. {
  40. $info = fgets($fp);
  41. }
  42. $info = str_replace('</body></html>', "", $info);
  43. $split = explode(',', $info);
  44. if (empty($split[6]) )
  45. {
  46. echo "Dados sobre músicas não disponível"; // Diaplays when sever is online but no song title
  47. }
  48. else
  49. {
  50. $title = str_replace('\'', '`', $split[6]);
  51. $title = str_replace(',', ' ', $title);
  52. echo "Tocando agora: ";
  53. echo "$title"; // Diaplays song
  54. }
  55. }
  56. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement