Header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
 Header("HTTP/1.0 401 Unauthorized");
 exit();

this forces all my clients to re-login. you can not log someone out be
changing the value off PHP_AUTH_USER because that variable is set by the
client everytime the page is loaded. you can change it all you want, but the
client wont know your changing it. thus wont care. hehe

I assume thats just a typo you made on the post, not in your code.
"HTTP/1.0" not "HTTP/1,0" on a comment I need both those lines, not just
one. Ive been told, never needed to, that another sure way to log someone
out is to change the realm.

 function mtime()
 {
  $mtime = microtime();
  $mtime = str_replace('.', '', $mtime);
  $mtime = explode(' ', $mtime);
  $mtime = $mtime[1] . $mtime[0];

  return($mtime);
 }

 Header("WWW-Authenticate: Basic realm='". mtime() ."' ");
 Header("HTTP/1.0 401 Unauthorized");
 exit();

--

  Chris Lee
  [EMAIL PROTECTED]



""Cefull Lo"" <[EMAIL PROTECTED]> wrote in message
9gs89c$u29$[EMAIL PROTECTED]">news:9gs89c$u29$[EMAIL PROTECTED]...
> When I use the follow code to make a member login,
>
> header ("WWW-Authenication: basic realm='my login'");
>
> Once you are logined, the session seems never end. (ie $PHP_AUTH_USER
exist
> forever until you close the browser). Is it any way to put an end on this
> session and let people login with another name?
>
> The follow methods are tried and not work.
>
> header("HTTP/1,0 401 Unauthorized"); while logout clicked;
> $PHP_AUTH_USER=$PHP_AUTH_PW="";
>
> Thanks
>
> Cefull Lo
>
>
> --
> content-type:kiss/hug
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to