-- Forwarded message --
From: Ashim Kapoor
Date: Mon, Feb 21, 2011 at 12:46 PM
Subject: Re: [PHP] HTTP Authenticaion Query
To: Peter Lind
You are tired and not thinking straight. HTTP is a stateless thing: 1.
> you request the page, but you're not authorized, hence you
On 21 February 2011 06:27, Ashim Kapoor wrote:
> if (!isset($_SERVER['PHP_AUTH_USER'])) {
> header('WWW-Authenticate: Basic realm="My Realm"');
> header('HTTP/1.0 401 Unauthorized');
> echo 'Text to send if user hits Cancel button';
> exit;
> } else {
> echo "Hello {$_SERVER['PHP_
Hello {$_SERVER['PHP_AUTH_USER']}.";
echo "You entered {$_SERVER['PHP_AUTH_PW']} as your password.";
}
?>
Dear All,
Above is a code example from php.net
http://php.net/manual/en/features.http-auth.php
What I am left wondering is the SEQUENCE OF FLOW of logic here. Assume a
page has ONLY thi
3 matches
Mail list logo