Buona sera a tutti
Ho un problemino con una pagina
protetta da password...
Il seguente codice funz correttamente in locale
ma online non mi convalida la password o user...
ecco lo script incriminato:
<?PHP
$username = "test";
$password = "test";
function authenticate() {
Header( "WWW-authenticate: basic realm=\"Protected\"");
Header( "HTTP/1.0 401 Unauthorized");
echo "Login incorretto\n";
echo "
";
echo (' Indietro ');
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();
}
?>
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; iso-8859-1">
<META HTTP-EQUIV="Pragma" content="no-cache">
<title> ~ Master CMS ~</title>
</head>
<body leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
eccetera...
Se qualcuno č in grado di aiutarmi ne sarei
veramente grato grazie