note 36731 added to features.http-auth

From: Date: Mon, 20 Oct 2003 14:40:09 +0000
Subject: note 36731 added to features.http-auth
Groups: php.notes 
Request: Send a blank email to php-notes+get-58947@lists.php.net to get a copy of this message
Hi there. Thought long and hard to come up with a logout mechanism that erases the variables $PHP_AUTH_USER and $PHP_AUTH_PW. Finally came up with something, it is better than nothing, hope somebody will find it usefull: logout.php: <? header("Location: http://EnterYourUserName:YourPassword@ServerRoot".$PHP_SELF); exit; ?> "EnterYourUserName" and "YourPassword" will be the two variables new value, while "ServerRoot" is your server's domainname (like www.somedomain.com). You should ensure, that nobody will use "EnterYourUserName" as it's login name. Happy coding. ---- Manual Page -- http://www.php.net/manual/en/features.http-auth.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36731 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36731&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36731&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58947) next »