I am using the folowing script for authorization:
$username = "test";
$password = "123";
function authenticate() {
Header( "WWW-authenticate: basic realm=\"Protected\"");
Header( "HTTP/1.0 401 Unauthorized");
echo "Gebruikersnaam en/of wachtwoord is niet goed ingevuld!\n";
exit;
}
function CheckPwd($user,$pass) {
global $username,$password;
return ($user != $username || $pass != $password) ? false : true;
}
if(!isset($PHP_AUTH_USER)) {
authenticate();
}
elseif(!CheckPwd($PHP_AUTH_USER,$PHP_AUTH_PW)) {
authenticate();
}
On my hosting provider this script works fine, om my own computer
where I
run a server it doesn't work.
I run an Internet Information Server on my own computer.
Anyone has an idea.
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php