Click to See Complete Forum and Search --> : File()


Anon
04-18-2002, 03:48 PM
Function file() doesn't work with global URL's under Windows.
For example,

$file=file('http://www.sumping.com/');
for($i=0; $i<sizeof($file); $i++){
print $file[$i];
}
doesn't work.

Shows:

Warning: php_hostconnect: connect failed in w:\usr\local\htdocs\xp\rep.php on line 30

Warning: file("http://www.icq.com/") - Bad file descriptor in w:\usr\local\htdocs\xp\rep.php on line 30

What kind of problem could it be?
Thanks.

akcakayaa
04-19-2002, 09:48 AM
You should activate "fopen Wrappers"

http://www.php.net/manual/tr/function.fopen.php

Anon
04-19-2002, 04:34 PM
ASA wrote:
-------------------------------
You should activate "fopen Wrappers"

http://www.php.net/manual/tr/function.fopen.php

Sorry, I haven't said: fopen wrappers are activated.

To all:
Can the fact, that I use dialup connection via proxy-server cause this problem?

Anon
04-21-2002, 02:44 PM
yep the proxy is probably your problem, I use snoopy to get round proxy problems as you can add your proxy server to its config - try snoopy.sourceforge.net