Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <meta http-equiv="refresh" content="120" >
- <body>
- <font color="#FF0000" size="+2"><marquee direction="left" loop="6" width= "90%" height="35px">
- <?php
- /* ----------- Server configuration ---------- */
- $ip = "StreamIP";
- $port = "StreamPort";
- /* ----- No need to edit below this line ----- */
- /* ------------------------------------------- */
- $fp = @fsockopen($ip,$port,$errno,$errstr,1);
- if (!$fp)
- {
- echo "Connection refused"; // Displays 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 "De RDS heeft de deejay uitgeschakeld vandaar dat het niet zichtbaar is"; // Displays when sever is online but no song title
- }
- else
- {
- $title = str_replace('\'', '`', $split[6]);
- $title = str_replace(',', ' ', $title);
- echo "$title"; // Displays song
- }
- }
- ?>
- </marquee>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement