[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Status & CVS & objects
> You send the browser a 'WWW-Authenticate: Basic realm="OurRealm"' header for
> every page you want authorized and the browser automatically handles it and
> sends you back a string you need to parse.
Well sweet. This is exactly what I was asking for. It should be no big
deal to impliment it then. I'll just do it this way.
And everyone will know via $current_user as I stated before.
Thanks Dan.
>
> <?php
> if(!isset($PHP_AUTH_USER)) {
> Header("WWW-Authenticate: Basic realm=\"My Realm\"");
> Header("HTTP/1.0 401 Unauthorized");
> echo "Text to send if user hits Cancel button\n";
> exit;
> } else {
> echo "Hello $PHP_AUTH_USER.<P>";
> echo "You entered $PHP_AUTH_PW as your password.<P>";
> }
> ?>
>
> Which I shamelessy ripped from the PHP user's guide, which has a section on
> this issue (Chapter 16 under Features).
>
> --
> -------------------
> Daniel E. Markle
> syntax@ashtech.net
> http://www.ashtech.net/syntax
> -------------------
--
Jason
http://vodka.linuxkb.org/~chardros