php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18456 fopen() doesn't open URLs that redirect (e.g. http://www.s.com/p.asp?w=asdf)
Submitted: 2002-07-21 12:25 UTC Modified: 2002-07-21 12:32 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: shlok at ript dot net Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 4.2.1 OS: Windows 2000
Private report: No CVE-ID: None
 [2002-07-21 12:25 UTC] shlok at ript dot net
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-21 12:32 UTC] sesser@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
 [2002-07-21 12:32 UTC] sesser@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue May 21 22:01:26 2019 UTC