http autentification
Posted by: pierre1405
Posted on: 2006-03-15 18:21:00
I try to use this script :
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('');
echo 'Texte utilisé si le visiteur utilise le bouton d'annulation';
exit;
} else {
echo "<p>Hello, {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>Your password is {$_SERVER['PHP_AUTH_PW']}.</p>";
}
but $_SERVER['PHP_AUTH_USER'] is never set, does someone have an idea???
It's should work, but not with my hosting.
I tried to use htaccess, but it block dynamic download for my flash application, even if I don't forbid linking for file.