Technroll.com

13 Sep, 2008

htaccess logout - simple and works

Posted by: Admin In: Web Programming

< ?php

$loginname = $_SERVER[’PHP_AUTH_USER’];
$password = $_SERVER[’PHP_AUTH_PW’];
if(!$user_info[’user_id’])
{
unset($user_info);
unset($loginname);
unset($password);
header(’HTTP/1.1 401 Unauthorized’);
header(’WWW-Authenticate: Basic realm=”Restricted Area”‘);
echo “Access Denied.”;
exit;
}
? >

No Responses to "htaccess logout - simple and works"

Comment Form

About

This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from.