Bug #15432: fopen does not work with password-protected URLs
| From: | mqm at magma dot ca | Date: | Thu, 07 Feb 2002 19:01:53 +0000 |
| Subject: | Bug #15432: fopen does not work with password-protected URLs | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-79568@lists.php.net to get a copy of this message | ||
From: mqm@magma.ca
Operating system: Windows 2000
PHP version: 4.1.0
PHP Bug Type: HTTP related
Bug description: fopen does not work with password-protected URLs
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:password@192.168.3.1/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 bug report at http://bugs.php.net/?id=15432&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15432&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15432&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15432&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15432&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15432&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15432&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15432&r=notenoughinfo