RE: [PHP] Authentication
| From: | Chris Shiflett | Date: | Tue, 16 Dec 2003 19:01:06 +0000 |
| Subject: | RE: [PHP] Authentication | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172829@lists.php.net to get a copy of this message | ||
--- Robert Sossomon <robert@gcnorris.com> wrote:
> I am not trying to authenticate off of a database though. I have
> scripts that automatically modify the .htaccess file as I change a
> user, so I need to authenticate off the .htaccess file and store
> the users information into a cookie. I think from the cookie I can
> do everything else, just not sure how to get the information from
> the browser to show me the user of the page.
I'm not sure I understand, but you can get the username and password used
in the HTTP authentication from these two variables:
$_SERVER['PHP_AUTH_USER']
$_SERVER['PHP_AUTH_PW']
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/