note 23811 added to features.http-auth
| From: | jason at toolmedia dot net | Date: | Mon, 29 Jul 2002 12:20:44 +0000 |
| Subject: | note 23811 added to features.http-auth | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33867@lists.php.net to get a copy of this message | ||
To "logout" of HTTP Auth all you have to do it unset PHP_AUTH_USER & PHP_AUTH_PW.
I came across this function and it works really well.
Below is what i use.(minus a few MySQL vars)
if($lo == 1) {
$phpuser = unset($GLOBALS['_SERVER']['PHP_AUTH_USER']);
$phppass = unset($GLOBALS['_SERVER']['PHP_AUTH_PW']);
if(($phpuser == "") && ($phppass == "")) {
echo "Now Logged out.<br />";
exit;
}
}
I hope this helps some of you.
(if anyone knows who wrote this, please post name below)
--
http://www.php.net/manual/en/features.http-auth.php
http://master.php.net/manage/user-notes.php?action=edit+23811
http://master.php.net/manage/user-notes.php?action=delete+23811
http://master.php.net/manage/user-notes.php?action=reject+23811