ID: 12965 Comment by: filipoiu_victor at yahoo dot com Reported By: ronaldo at inbox dot lv Status: Bogus Bug Type: Filesystem function related Operating System: Windows2000 PHP Version: 4.0.6 New Comment:
try this: $my_file = file ("http://www.google.com/search?q=%22invented%20the%20car%22&btnG=Google+Search"); it will result: No error in my_script.php on line xxx I have Win98SE PHP 4.3.4 OmniHTTPD 2.10 IE 5.5 The same thing works under PHP 4.3.4, Win2000 with IIS and IE6 Previous Comments: ------------------------------------------------------------------------ [2001-08-28 14:24:31] [EMAIL PROTECTED] I got a slightly different error: Warning: fopen("http://www.php.net","r") - No error in e:\sander\webserver\http\test\test1.php on line 10 If you append a / to the url, it works: fopen("http://www.php.net/", "r") The errors are a bit weird though... Let's make it a bogus. ------------------------------------------------------------------------ [2001-08-26 10:45:23] ronaldo at inbox dot lv I'm using PhP 4.0.6 with Apache 1.3 and the problem is opening remote files with fopen("http://..."); The following code: >$fp = fopen("http://www.php.net", "r") or die("OPEN"); >while (! feof($fp)) >{ > fread($fp, 1024) or die("READ"); >} >fclose($fp) or die("CLOSE"); Produced the following output: >Warning: php_hostconnect: connect failed in filename.php.. > >Warning: fopen("http://www.php.net","r") - Bad file >descriptor in filename.php.. I tried to use fsockopen() with my IE proxy and port settings - it was successful. Maybe the problem is in Apache configuration, but I just can't figure that out! If you can help, please, send to my email: [EMAIL PROTECTED] Kind regards ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=12965&edit=1