I'm pretty new to php, not so new to programming. My problem is really simple, and seems almost impossible to search for. When I reference an html link, the // renders everything after http: as a comment.
I'm trying to learn to write webbots. This is the first basic lesson of the book "Webbots, Spiders and Screenscrapers":
$target = "http://www.example.com/index.html";
$file_handle = fopen($target, "r");
while(!feof($file_handle))
echo fgets($file_handle, 4096);
fclose($file_handle);
It fails on both my Linux machine and Mac. "Parse error: parse error in Command line code on line 1". In the editor (nano) I see that everything after http: in line 1 is highlighted as a comment.
This is straight from the book. What am I doing wrong?