Apache - php password script question.

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


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-05-2007
Richard Brooks
 
Posts: n/a
Default Apache - php password script question.

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!
Reply With Quote
  #2 (permalink)  
Old 03-06-2007
shimmyshack
 
Posts: n/a
Default Re: Apache - php password script question.

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"

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:00 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0