Sun Nov 30, 2008 8:44 pm
<?php
function checklogin($username, $password){
if (
(
!isset($_SERVER['USER_USERNAME']) ||
(
isset($_SERVER['USER_USERNAME']) &&
$_SERVER['USER_USERNAME'] != $username
)
) &&
(
!isset($_SERVER['USER_PASSWORD']) ||
(
isset($_SERVER['USER_PASSWORD']) &&
$_SERVER['USER_PASSWORD'] != $password
)
)
)
{
header('WWW-Authenticate: Basic realm="Login"');
header('HTTP/1.0 401 Unauthorized');
echo 'Please login first.';
exit;
}
}
?>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.