Using AUTH_HTTP, you can easily build programs based on HTTP authentication, and you can freely specify user data tables, making the operation simple and easy to use...
example:
<?php
require_once("Auth/HTTP.php");
$options = array(
'dsn'=>"mysql://root:@localhost/test", //database connection string
'table'=>"test_http", //User table
'usernamecol'=>"name", // username field
'passwordcol'=>"passwd", //User password field
'cryptType'=>"md5", // Password plus password method
'db_fields'=>"*",
);
$a = new Auth_HTTP("DB", $options);
$a->setRealm('yourrealm'); // realm name
$a->setCancelText('Error 401'); // Prompt message when verification fails
$a->start(); // starting the authentication process
if($a->getAuth()) // Success
{
echo "Hello $a->username welcome to my secret page";
echo $a->getAuthData('userid'); // Get other fields
echo $a->getAuthData('telephone'); //
echo $a->getAuthData('email');
//print_r($a);
};
?>
Just add this program before the program to be verified..