Re: FOPEN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






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@xxxxxxxxxxx";) 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux