Re: warning php_hostconnect: connect failed

From: Date: Fri, 22 Jun 2001 17:59:12 +0000
Subject: Re: warning php_hostconnect: connect failed
References: 1 2  Groups: php.install 
Request: Send a blank email to php-install+get-3317@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. | > "Jani Taskinen" <sniper@iki.fi> schreef in bericht news:Pine.LNX.4.33.0106221843050.23110-100000@zoidberg.pentap.net... | | There is no support for redirected urls yet. | Use the 'direct' url instead: | | $fcontents = file ('http://www.php.net/'); | | That works. (note the trailing / ?) I appreciate your help but this doesn't make any difference. I still get the same error

« previous php.install (#3317) next »