Re: reverse http authentication

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

 



Chris W wrote:

> I want to read a page that is protected with http authentication.  How
> do I pass the user name and password to be authenticated with my php
> code?
>
Have you tried to just put the username and password in the URL?  I'm
not sure if this works, its so simple its worth a try.  Instead of using
(whatever function you use) like the first example try changing it like
the second:

x('http://example.com/protected/page.php');
x('http://username:password@xxxxxxxxxxx/protected/page.php');

Of course it depends on the 'x' you are using...  I'm really not sure if
PHP's functions will take care of moving that username/password
information into the header of the HTTP request or just leave it there.

Travis Doherty

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