// Render the page with full html code function render_page ($title, $body) { echo ''; echo "\n\n
\n"; echo "Back to Problem Set index page
\n"; echo "\n"; echo ""; } // Construct title and body-content for page rendering function construct_page ($htmlstring) { $now = date("Y-m-d H:i:s"); $title = "The top news item in mbl.is - $now"; $body = "Currently ($now) the top story in the Icelandic news site mbl.is is:
" ."$htmlstring"; render_page ($title, $body); } // Get the HTML page that contains the dollar exchange rate $content = file_get_contents ("http://www.mbl.is"); // The pattern to use with the ereg command $pattern = '(" ."Please send me an thorarinn@itu.dk."); } ?>