Top Stories from Google News - refreshes every 20 seconds


fopen($url); // I think this is for debugging; don't need it for this script $response = $be->getLastResponseHeaders(); // Read a lot (all) of it $RetrieveFile = fread($file, 100000); // Close the file fclose($file); // Stuff from the original grabber script $GrabStart = ' World '; $GrabEnd = ' U.S. '; # Given $GrabStart and $GrabEnd, and passed a string ($RetrieveFile), # it puts everything between Start and End into an array ($DataPrint). eregi("$GrabStart.*$GrabEnd", $RetrieveFile, $DataPrint); # Do some reformatting -- rewrite the array contents every time # Take care of the relative links $DataPrint[0] = str_replace('href=', 'href=http://news.google.com/news?ned=tus', $DataPrint[0]); # Results echo($DataPrint[0]); ?>