Hi!
I was wondering if it would be possible to login to a $_SERVER[PHP_AUTH_USER] authenticated page using a web form or by specifying the variable from within PHP.
Best Regards,
Snt
function authenticate() {
header('WWW-Authenticate: Basic realm="Admin"');
header('HTTP/1.0 401 Unauthorized');
print "NOT AUTHORIZED";
exit;
}
function authorize_girl() {
if (!isset($_SERVER['PHP_AUTH_USER'])) {
$this->authenticate();
} else {
if ($user = $this->verify_girl(array('username'=>$_SERVER[PHP_AUTH_USER],'password'=>$_SERVER[PHP_AUTH_PW]))) {
return $user;
} else {
$this->authenticate();
}
}
}