Jump to content

Recommended Posts

Posted
//http authentication, code

<?php

$the_right_user='user';

$the_right_password='password';

if(!isset($PHP_AUTH_USER))

{

header("WWW-Authenticate: Basic realm=\"PHP book\" ");

header("HTTP/1.0 401 Unauthorized");

echo "Canceled by user\n";

exit;

}

else{

if(($PHP_AUTH_USER=='user') &&(PHP_AUTH_PW=='password'))

//see caution below

print("The realm is yours<br>");

else

print("We don't need your kind<br>");

}

?>

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.