Bug #18456: fopen() doesn't open URLs that redirect (e.g. http://www.s.com/p.asp?w=asdf)
| From: | shlok at ript dot net | Date: | Sun, 21 Jul 2002 16:25:50 +0000 |
| Subject: | Bug #18456: fopen() doesn't open URLs that redirect (e.g. http://www.s.com/p.asp?w=asdf) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-14731@lists.php.net to get a copy of this message | ||
From: shlok@ript.net
Operating system: Windows 2000
PHP version: 4.2.1
PHP Bug Type: *Directory/Filesystem functions
Bug description: fopen() doesn't open URLs that redirect (e.g. http://www.s.com/p.asp?w=asdf)
The URL in the summary was just an example. The real URL that I have in
mind is:
http://www.ordabok.is/index.asp?leitarord=car
It works fine if I type this URL in a browser. But when I execute the
following PHP code:
$fp = fopen("http://www.ordabok.is/index.asp?leitarord=car",
"r");
fclose($fp);
I get the following warnings:
Warning: php_network_getaddresses: gethostbyname failed in
c:\inetpub\wwwroot\test.php on line
Warning: fopen("http://www.ordabok.is/index.asp?leitarord=car",
"r") - No
such file or directory in c:\inetpub\wwwroot\test.php on line 3
Warning: fclose(): supplied argument is not a valid File-Handle resource
in c:\inetpub\wwwroot\test.php on line 4
I hope that someone can fix this problem.
Thanks.
Shlok
--
Edit bug report at http://bugs.php.net/?id=18456&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18456&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18456&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18456&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18456&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18456&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18456&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18456&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18456&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18456&r=globals