<?
session_start();
if ($_POST['user_name']=='user' AND $_POST['user_pass']=='pass') {
$_SESSION['authorized']=1;
if (defined("SID") AND constant("SID")) $sid="?".SID; else $sid='';
header("Location: member.php$sid");
exit;
}
?>
<form action="<? echo getenv('REQUEST_URI') ?>" method="POST">
Name: <input name="user_name" type="text" length="10"><br>
Pass: <input name="user_pass" type="password" length="10"><br>
<input name="submit" type="submit" value="Login">
</form>
<?
session_start();
if (empty($_SESSION['authorized'])) {header("Location: auth.php");exit;}
?>
СЕКРЕТНАЯ ИНФА!!!

$file="data.txt";
$fp=fopen($file, "r");
$auth_file=fread($fp, filesize($file));
fclose($fp);
if (!strstr($auth_file,$PHP_AUTH_USER.":".$PHP_AUTH_PW."\n")) {
header('WWW-Authenticate: Basic realm="Realm"');
header("HTTP/1.0 401 Unauthorized");
echo "Bad password";
exit;
}