I'm working through the "Practical PHP Programming" book on TuxRadar, and found this snippet of code (at http://www.tuxradar.com/practicalphp/8/14/0):
- Code: Select all
$slash = fopen("http://www.slashdot.org", "r");
$site = fread($slash, 200000);
The book says:
"Try saving the above code into a file, "openremote.php", and loading it into your web browser - you should see Slashdot displayed",
but when I did that, I got nothing but a blank screen. I changed "www.slashdot.org" to a local file, and that worked fine, but no non-local files will display (except for one site, http://www.townhall.com/columnists, which only displayed the blue background of the title bar).
Does anyone have any suggestions as to why this code isn't working? Any input would be appreciated.