<?php
error_reporting(0);
//admin
//admin
if (!isset($_SERVER['PHP_AUTH_USER']) or isset($_POST['kaybol'])) {
    header('WWW-Authenticate: Basic realm="Koruma"');
    header('HTTP/1.0 401 Unauthorized');
    echo '<h1>Engellendi!</h1>';
    exit;
} else {
    if(!($_SERVER['PHP_AUTH_USER']=='admin' and sha1($_SERVER['PHP_AUTH_PW'])=='d033e22ae348aeb5660fc2140aec35850c4da997'))
    {
        header('HTTP/1.0 401 Unauthorized');
        exit;
    }
	echo '<h1>Başaırılı!</h1>';
}
?>
<html>
<head>
</head>
<body>
<form method="POST">
<button name="kaybol" type="submit">Kaybol</button>
</form>
</body>
</html>

<?php
error_reporting(0);
if($_GET['gizli'] == "sayfa") {
 
if (!isset($_SERVER['PHP_AUTH_USER']) or isset($_POST['kaybol'])) {
    header('WWW-Authenticate: Basic realm="Koruma"');
    header('HTTP/1.0 401 Unauthorized');
    echo '<h1>Engellendi!</h1>';
    exit;
} else {
    if(!($_SERVER['PHP_AUTH_USER']=='admin' and sha1($_SERVER['PHP_AUTH_PW'])=='d033e22ae348aeb5660fc2140aec35850c4da997'))
    {
        header('HTTP/1.0 401 Unauthorized');
        exit;
    }
	echo '<h1>Başaırılı!</h1>';
	echo '<form method="POST">';
	echo '<button name="kaybol" type="submit">Kaybol</button>';
	echo '</form>';
}
exit;
}
	echo '<h1>Not Found</h1>
	<p>Additionally, a 404 Not Found
	error was encountered while trying to use an ErrorDocument to handle the request.</p>';
?>