Hi, I'm using this simple code to open a page with fopen:
<?PHP
$webpage = "http://www.irandiba.net";
$fp = fopen( $webpage, "r+") or die("Couldn't open the following URL : $webpage");
while ( !feof( $fp))
{
print fgets( $fp, 1024);
}
?>
But it gives me this error message:
Warning: fopen("http://irandiba.net","r") - Unknown error in /home/www/sajharsanat/test/fopen.php on line 8
Couldn't open the following URL : http://irandiba.net
It's something wrong about this message I think; if you look at the URL that it gives as the source of error, you see that it doesn't have www in it. My $webpage is equal to "http://www.irandiba.net", but in the warning message I can't see the WWW. What's going on?!