Kontakti
Par Radio YOLO Riga
Programma

Tagad skan:

uz 'Radio YOLO Riga' (MP3 ar 192 kbps)

Kontakti

Par radio

Programma

Copyright © RADIO YOLO RIGA. All rights reserved.

LIVE Broadcast

19) $t_max=10; //19 is the max here because 20=current_track+19 // Let's get /index.html first... to keep this short, there is no code to handle the dnas being down // or not running, so the script will display nothing in those cases. $connect_timeout=5; $success=0; $fp1 = fsockopen($host, $port, &$errno, &$errstr, $connect_timeout); //open connection if(!$fp1) { //if this fails, I'm done.... fclose($fp1); $success++; } else { $request="GET /index.html HTTP/1.1\r\nHost:" . $host . ":" . $port . "\r\nUser-Agent: SHOUTcast DNAS Status ***91;index***93; * (Mozilla/PHP)\r\nConnection: close\r\n\r\n"; //get index.html fputs($fp1,$request,strlen($request)); $page=''; while(!feof($fp1)) { $page .= fread($fp1, 16384); } fclose($fp1); // now I have the entire /index.html in $page -- all I want from here is the current track... // (hint-hint) $song00 = ereg_replace(".*", "", ereg_replace(".*Current Song: ", "", $page)); // easy, right // now let's get /played.html... (this is kinda long) $fp = fsockopen($host, $port, &$errno, &$errstr, $connect_timeout); if(!$fp) { //if connection could not be made fclose($fp); $success++; } else { $request="GET /played.html HTTP/1.1\r\nHost: " . $host . ":" . $port . "\r\nUser-Agent: SHOUTcast DNAS Status ***91;played***93; * (Mozilla/PHP)\r\n"."Connection: close\r\n\r\n"; fputs($fp,$request,strlen($request)); $page=''; while (!feof($fp)) { $page .= fread($fp, 16384); } fclose($fp); //close connection $played_html=$page; if ($played_html) { $played_html= ereg_replace('','|-|',ereg_replace('','',ereg_replace('','',ereg_replace('','',ereg_replace('','' . $lf,ereg_replace('-->','--***93;',ereg_replace('