I noticed that Message-ID:
<2c************ *************@p osting.google.c om> from Carlos Marangon
contained the following:
hello!
Can anyone please tell me where can I find a script that
deny access if password is wrong 3 times
For a single username and password, you can include the following at the
beginning of each page.
<?php
// Check to see if $PHP_AUTH_USER already contains info
if (!isset($GLOBAL S['PHP_AUTH_USER'])) {
// If empty, send header causing dialog box to appear
header('WWW-Authenticate: Basic realm="My Private Stuff"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
} else if (isset($GLOBALS['PHP_AUTH_USER'])) {
if (($GLOBALS['PHP_AUTH_USER'] != "Username") ||
($GLOBALS['PHP_AUTH_PW'] != "Password") ) {
header('WWW-Authenticate: Basic realm="My Private Stuff"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
} else {
echo "
<P>You're authorized!</p>
";
}
}
?>
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs
http://www.ckdog.co.uk/rfdmaker/