If you are behind a firewall or proxy, you will not be able to connect to
www.php.net.  If you are not behind a firewall or proxy and you are getting
php_hostconnect errors then you need to make sure that you can get to the
php.net other than with your browser.

You can also try using fopen() as well...


Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-----Original Message-----
From: Hayan Al Mamoun [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 19, 2002 3:58 AM
To: PHPList (E-mail)
Subject: [PHP-DB] Problem with file() function


Dear sirs, Please help with the follows:
When I'm trying to execute this code:
--------------------------------
$fcontents = file ('http://localhost/');
while (list ($line_num, $line) = each ($fcontents)) {
    echo "<b>Line $line_num:</b>; " . htmlspecialchars ($line) . "<br>\n"; }
--------------------------------
it runs perfectly, but when I try to change to:
--------------------------------
$fcontents = file ('http://www.php.net/');
while (list ($line_num, $line) = each ($fcontents)) {
    echo "<b>Line $line_num:</b>; " . htmlspecialchars ($line) . "<br>\n"; }
--------------------------------
it dosn't work, Can you tell why please...

Best Regards
Hayan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to