Problem with Fopen
Posted: Thu Oct 22, 2009 4:21 am
I'm trying to get the contents of an external file and display it on my page but the code doesn't seem to work. Do you have any idea what's the problem here? Thank you for your time.
Code: Select all
<?
$fd = fopen ("http://www.google.com", "r");
while (!feof ($fd)) {
$yaks= fgets($fd, 4096);
echo $yaks;
}
fclose ($fd);
?>