You are here: Re: Apache - php password script question. « PHP Language « IT news, forums, messages
Re: Apache - php password script question.

Posted by shimmyshack on 03/06/07 00:36

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"

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация