Posted by Richard Lynch on 02/17/05 20:23
Diana Castillo wrote:
> How can I read the contents of a web page that uses basic
> authentication?
> I want to use fopen() but dont know how to do this and also send the
> username and password
You may be able to do embed the username/password in your URL:
$file = fopen("http://username:password@example.com") or die("Could not
open remote page");
You may want to actually store the username/password in a different file,
and try to make it slightly less easy to read/find that file to avoid
exposing passwords, the same way you would do with MySQL
username/password.
--
Like Music?
http://l-i-e.com/artists.htm
Navigation:
[Reply to this message]
|