I tried the following:
<?php
$open = fopen("http://www.yahoo.com/index.html", "r");
// the above statement opens up the yahoo! page using the socket libraries and reads it,
// fopen takes the pages as the 1st arguement and type of opening (r in this case) as the 2nd
$read = fread($open, 15000);
// fread scours to the 15000th byte and captures all the encountered bytes into $read
fclose($open);
?>
and I got these errors
Warning: php_hostconnect: connect failed in C:\apache\htdocs\test\news.php on line 3
Warning: fopen("http://www.yahoo.com/index.html","r") - Bad file descriptor in C:\apache\htdocs\test\news.php on line 3
Warning: Supplied argument is not a valid File-Handle resource in C:\apache\htdocs\test\news.php on line 8
Warning: Supplied argument is not a valid File-Handle resource in C:\apache\htdocs\test\news.php on line 12
News HeadLine (No. 1) :
PLEASE HELP!