What is the purpose of the 401 Header in this PHP Manual Chapter 34 'HTTP/1.0 401 Unautho...

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


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';
} else {
    echo "<p>Hello .</p>";
    echo "<p>You entered as your password.</

Site Timeline