<?php
if (($_SERVER['PHP_AUTH_USER'] != 'a') || ($_SERVER['PHP_AUTH_PW'] != 'a')) {
header('WWW-Authenticate: Basic Realm="Secret Stash"');
header('HTTP/1.0 401 Unauthorized');
print('You must provide the proper credentials!');
exit;
}
else{
echo 'login done';
//do stuff here
}
?>
No comments:
Post a Comment