This is a discussion on Apache - php password script question. within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I've got a standard php username and password checking system written but I now need to be able to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've got a standard php username and password checking system written
but I now need to be able to allow access to a restricted folder if the user's details have been validated. It would have been nice to allow the php checking section to pass a master name and password and then for the .htaccess and .htpasswd files to allow entries for all users who pass the criteria without the HTTP username/password popup box showing up then allow them access to the folder. Is there an invisible way in php to do this ? Many thanks! |
|
|||
|
On Mar 5, 10:20 pm, Richard Brooks <richardbro...@vickers-
supermarine.com> wrote: > I've got a standard php username and password checking system written > but I now need to be able to allow access to a restricted folder if the > user's details have been validated. > > It would have been nice to allow the php checking section to pass a > master name and password and then for the .htaccess and .htpasswd files > to allow entries for all users who pass the criteria without the HTTP > username/password popup box showing up then allow them access to the > folder. > > Is there an invisible way in php to do this ? > > Many thanks! its just the base64encoded colon separated string user:pass inside the http header Authorization with the word Basic to denote Basic authentication to the server so the full auth header that php would have to send with the request would be header( 'Authorization: Basic cmF0LWEtdGF0LXRhdDpjb21lLWlu' ); if you wanted to transparently authenticate the user "rat-a-tat-tat" with password "come-in" |
![]() |
| Thread Tools | |
| Display Modes | |
|
|