I try to use fopen to open a other site page.But can not open it.Why?
I can open my localhost by hostname.
can u descibe more detail?
the error message is:
Warning: fopen("http://wwww.php.net/","r") - Transport endpoint is not c onnected in search.php on line 91
it work well. my sample code: ################# BEGIN ################### <? $fp = fopen("http://www.php.net/", "r"); if ($fp){ echo "connect!<br>\n"; while ($line = fgets( $fp, 1024 )){ echo htmlspecialchars($line)."<br>"; } } else { echo "Can't connect"; } fclose($fp); ?> ################# END #####################
Yes it is OK.
Thanks.