warning php_hostconnect: connect failed
| From: | Joris Van Droogenbroeck | Date: | Fri, 22 Jun 2001 11:18:14 +0000 |
| Subject: | warning php_hostconnect: connect failed | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-3311@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to read some webpage in a file.
I've got some code from de php.net website:
<?php
// get a web page into an array and print it out
$fcontents = file ('http://www.php.net');
while (list ($line_num, $line) = each ($fcontents)) {
echo "<b>Line $line_num:</b> " . htmlspecialchars ($line) .
"<br>\n";
}
// get a web page into a string
$fcontents = join ('', file ('http://www.php.net'));
?>
When I'm trying to run this code I get the following errors:
Warning: php_hostconnect: connect failed in C:\Program Files\Apache
Group\Apache\htdocs/source/screener.php on line 17
Warning: file("http://www.php.net") - Bad file
descriptor in C:\Program
Files\Apache Group\Apache\htdocs/source/screener.php on line 17
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program
Files\Apache Group\Apache\htdocs/source/screener.php on line 17
What does this mean? Is it a configuration problem?
When I try this code with some local file it works very well.
I'm a windows user.