"; echo "$errstr"; exit; } if($scsuccs!=1){ fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n"); while(!feof($scfp)) { $page .= fgets($scfp, 1000); } ###################################################################################################################### /////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //define xml elements $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "MAXLISTENERS", "BITRATE"); $y=0; while($loop[$y]!=''){ $pageed = ereg_replace(".*<$loop[$y]>", "", $page); $scphp = strtolower($loop[$y]); $$scphp = ereg_replace(".*", "", $pageed); if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE) $$scphp = urldecode($$scphp); // uncomment the next line to see all variables //echo'$'.$scphp.' = '.$$scphp.'
'; $y++; } //end intro xml elements ###################################################################################################################### ###################################################################################################################### /////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //get song info and history $pageed = ereg_replace(".*", "", $page); $pageed = ereg_replace(".*", "", $pageed); $songatime = explode("", $pageed); $r=1; while($songatime[$r]!=""){ $t=$r-1; $playedat[$t] = ereg_replace(".*", "", $songatime[$r]); $playedat[$t] = ereg_replace(".*", "", $playedat[$t]); $song[$t] = ereg_replace(".*", "", $songatime[$r]); $song[$t] = ereg_replace(".*", "", $song[$t]); $song[$t] = urldecode($song[$t]); $dj[$t] = ereg_replace(".*", "", $page); $dj[$t] = ereg_replace(".*", "", $pageed); $r++; } //end song info fclose($scfp); } ?>
$lang7
$lang8
"; exit;} ?>
:
$servertitle"; ?>
:
$song[0]"; ?>
:
$bitrate KBPS"; ?>
:
$currentlisteners"; ?>