function authenticate() {
header('WWW-Authenticate: Basic realm="멤버쉽 인증 시스템"');
header('HTTP/1.0 401 Unauthorized');
exit("이 자원에 접근하기 위해서는 유효한 로그인 ID와 패스워드를 입력해야 합니다.\n
<br />This server could not verify that you are authorized to access the URL \"$_SERVER[REQUEST_URI]\".\n
<br />You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.\n
<br />In case you are allowed to request the document, please check your user-id and password and try again.<hr>\n");
}
if ((!isset($_SERVER['PHP_AUTH_USER'])) || (!isset($_SERVER['PHP_AUTH_PW']))) {
authenticate();
}
elseif ((isset($_SERVER['PHP_AUTH_USER'])) && (isset($_SERVER['PHP_AUTH_PW']))) {
foreach($auth_Member as $Acc_user) {
if ($Acc_user == $_SERVER['PHP_AUTH_USER'] . "," . $_SERVER['PHP_AUTH_PW']) {
$authIn = "TRUE";
}
}
if ($authIn != "TRUE") authenticate();
}
?>
여기 밑으로 인증후 보일 내용<br />
멤버로 들어 오셨군요.. 환영합니다.!