ID: 15432
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Feedback
+Status: Open
Bug Type: HTTP related
Operating System: Windows 2000
PHP Version: 4.1.0
New Comment:
curl (like wget) can fetch the page, so I don't think there are any
redirects.
This is what I get if I remove the @ before fopen:
<font color=ff0000><br>
<b>Warning</b>: fopen("http:[EMAIL PROTECTED]/Status.htm", "r") - No
error in <b>C:\Xitami\webpages\test.php</b> on line <b>5</b><br>
</font>Can't fetch the page
(http://user:[EMAIL PROTECTED]/Status.htm), so I am giving up !!
Previous Comments:
------------------------------------------------------------------------
[2002-02-07 17:48:06] [EMAIL PROTECTED]
I cannot reproduce this neither on Linux nor on Windows 2000. Does that
URL create any http redirects? Do you get any error messages if you
remove @ before fopen?
------------------------------------------------------------------------
[2002-02-07 16:14:58] [EMAIL PROTECTED]
Both curl and the web browser can fetch the document using the notation
below, no problem (so, the user/password is correct).
I was also able to fetch a password-protected page from dhs.org via
PHP, so I am not sure why it is failing for the Linksys web server.
Maybe if I could debug what is being sent/received over the wire.
------------------------------------------------------------------------
[2002-02-07 14:01:52] [EMAIL PROTECTED]
I am trying to fetch the web page from my Linksys ADSL router, which
is password-protected, but fopen does not seem to understand the URL
format where a user/password is provided (like with FTP). See below.
<?php
$linksys_info_url = "http://user:[EMAIL PROTECTED]/Status.htm";
$f_page = @fopen ($linksys_info_url, "r");
if ($f_page) {
$page_contents = fread ($f_page, 1024);
fclose ($f_page);
print ($page_contents);
} else {
echo "Can't fetch the page ($linksys_info_url), so I am giving up
!!";
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15432&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php