Some time back the following code was proposed to fetch contents of a given URL.
<?
$htm=join('',file("http://www.site.com"));
print $htm;
?>
When I recently tried it out, it worked for sites which exist but for invalid (not found) URL's the script just hung up.
Any clues?