 utahluge
join:2004-10-14 Draper, UT
·Comcast
| Basic Auth -> PHP Specific Page
I have done some searching and maybe I am just not using the right terminology.
What I Have: - Basic Authentication to a directory.
What I Want: - Pass that authentication to a PHP page that will get specific data based on the credentials (username).
We need not worry about what the PHP will do, just how to pass the username after authentication to the PHP.
Thanks!! |
|
 Shark_615
join:2006-01-17 Pickering, ON | »ca.php.net/features.http-auth |
|
  Gwellin Premium join:2004-05-31 Regina, SK
·Access Communicati..
1 edit | I was just about to post the same link as Shark_615
Basically you should have the username under $_SERVER['PHP_AUTH_USER']. It's possibly stored in another key however, for example on my DreamHost server I get it from $_SERVER['REDIRECT_REMOTE_USER']. To test this out create a php file within a Basic Auth directory which contains the following:
On the resulting page simply search for the username you logged in with. That is the key under $_SERVER you need to use.
-- I have to come up with a signature now? |
|
 utahluge
join:2004-10-14 Draper, UT | Thank you very much! I am only a beginner level with php so this is great! |
|