","",$data); $data=ereg_replace(".*","",$data); list($listeners,$status,$peak,$max,$reported,$bitrate,$track)=explode(",",$data,7); if($status=='0') { if($offline_on_nothing==true) { echo "
".$station_name." is currently offline
Check show times
"; } else { echo '
'.$station_name.' is online '; echo '('.$listeners.'/'.$max.' listeners)
Playing nothing'; } } else { // thanks to Qtax_ in #regex on irc.freenode.net for this first expression preg_match("/- (.*?)$/",$track,$matches); $song=''.$matches[1].''; // I'm so proud I figured out the next one by myself :D preg_match("/^(.*?) -/",$track,$matches); $song.='
by '.$matches[1].''; echo '
'.$station_name.' is online '; echo '('.$listeners.'/'.$max.' listeners)
Playing '.$song.'
'; } } else { echo '
ERROR 01: Server Down
'; } ?>