Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- body,td,th {
- font-family: "Century Gothic";
- font-size: 12px;
- }
- </style>
- <meta http-equiv="refresh" content="15"/>
- <?php
- /*
- Now Playing PHP script for SHOUTcast
- This script is (C) MixStream.net 2008
- Feel free to modify this free script
- in any other way to suit your needs.
- Version: v1.1
- */
- /* ----------- Server configuration ---------- */
- $ip = "IP_DA_SUA_RADIO";
- $port = "PORTA";
- /* ----- No need to edit below this line ----- */
- /* ------------------------------------------- */
- $fp = @fsockopen($ip,$port,$errno,$errstr,1);
- if (!$fp)
- {
- echo "Servidor Offline"; // Diaplays when sever is offline
- }
- else
- {
- fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
- while (!feof($fp))
- {
- $info = fgets($fp);
- }
- $info = str_replace('</body></html>', "", $info);
- $split = explode(',', $info);
- if (empty($split[6]) )
- {
- echo "Dados sobre músicas não disponível"; // Diaplays when sever is online but no song title
- }
- else
- {
- $title = str_replace('\'', '`', $split[6]);
- $title = str_replace(',', ' ', $title);
- echo "Tocando agora: ";
- echo "$title"; // Diaplays song
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement