Click Here for the daily wit, whim, and wisdom of Norman Plunkett

"a unique mix of CHRISTIAN Audio", include "admin/xianfunctions"; $streams = array( "classic"=>"NORM'S RADIO - Classic radio programs" ); echo ""; while(list($stream, $desc) = each($streams)){ chdir("$playlistdir"); $active_playlist = "$stream.active"; if(file_exists($active_playlist)){ $play_arr = file($active_playlist); } else { continue; } // echo ""; $current = get_playing($stream); $last_source = ""; for($i = 0; $i < count($play_arr); $i++){ $this_program = trim($play_arr[$i]); $this_program = ereg_replace(".*/", "", $this_program); $title = ""; $title = get_title($this_program); if($title){ echo ""; if($current == $this_program){ echo ""; } else { echo ""; } $source_id = get_source_id($this_program); $source = get_source_name($source_id); if($source != $last_source){ $print_source = "$source
"; } else { $print_source = ""; } echo ""; echo "\n"; $last_source = $source; } } echo ""; echo "\n"; } echo "

// LISTEN // to $desc

now playing ->"; echo "$print_source"; echo " $title
"; echo " "; echo "info
 
"; function get_playing($stream){ $logfile = "/tmp/$stream.log"; $log = fopen("$logfile", "r"); while(!feof($log)){ $buf = fgets($log, 4096); if (ereg('^Encoding', $buf)){ $program = ereg_replace('^.*/', "", $buf); $program = trim($program); $program = ereg_replace('\.*$', "", $program); } } fclose($log); return($program); } // end of get_playing ?>



Click here to get the FREE RealAudio player