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


If the webpage is your script and it is going to check the authentication stuff, then simply use GET arguments


fopen("http://www.example.com/path/file?user=username&pw=password";, 'rb')

Then use....

$user= $_GET['user'];

$pw= $_GET['pw'];

Check the $user and $pw for validity.

If the webpage is not yours, then see if it can accept GET arguments for authentication, look at your browser's address bar to gain accesss. That will be your complete URL.

--
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