du kannst htaccess ja mit php faken..

vorschlag. nicht erst pw1 wenn das richtig is pw2.

lass lieber alle abfragen durchlaufen bevor du endscheidest welche passwörter richtig sind..

der "hacker" weiß dann nicht in welcher abfrage welches passwort richtig war.

außerdem kannste ja noch ne controlle mit zahlencode einbauen.


... reihenfolge stimmt hier net. musst selbst bissl basteln. beispiel funzt aber so.


Code:
<?php
session_cache_limiter("must-revalidate");

session_start();




//-----------------------------------------------------------------------
$abfragea='1:1';
$abfrageb='2:2';
$abfragec='3:3';
//-----------------------------------------------------------------------




function fail()
{
Header("WWW-Authenticate: Basic realm=\"\"");
Header("HTTP/1.0 401 Unauthorized");


echo'
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>


This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn\'t understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.2.3 (Debian) PHP/4.2.4-2debian5.3 with Suhosin-Patch Server at localhost Port 80</address>
</body></html>
';

exit;
}

$datena=explode(":",$abfragea);
$datenb=explode(":",$abfrageb);
$datenc=explode(":",$abfragec);


if($_SERVER['PHP_AUTH_USER']==$datena[0] && $_SERVER['PHP_AUTH_PW']==$datena[1])
{
$_SESSION['pw0']="true";
}

if($_SERVER['PHP_AUTH_USER']==$datenb[0]&& $_SERVER['PHP_AUTH_PW']==$datenb[1])
{
$_SESSION['pw1']="true";
}

if($_SERVER['PHP_AUTH_USER']==$datenc[0]&& $_SERVER['PHP_AUTH_PW']==$datenc[1])
{
$_SESSION['pw2']="true";
}

$pw0=$_SESSION['pw0'];
$pw1=$_SESSION['pw1'];
$pw2=$_SESSION['pw2'];

if($pw0!="true" or $pw1!="true" or $pw2!="true")
{
fail();
}
else
{
$_SESSION['login']="login";
}


if(isset($_GET['logout']))
{
session_destroy();
}

$login=$_SESSION['login'];

if($login!="login")
{
fail();
}

echo'logout

';
?> 








hallo ich bin der geheime text