Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $username= "admin";
- $password= jakieshaslo;
- if (!$PHP_AUTH_USER) {
- header("WWW-Authenticate: Basic realm=\"test\"");
- header("blad.html");
- exit;
- }
- else {
- if ($PHP_AUTH_USER != $username || $PHP_AUTH_PW != $password) {
- echo "papa";
- exit;
- }
- }
- $cookie_name = "auth";
- $cookie_value = "ok";
- $cookie_expire = "0";
- $cookie_domain = "";
- setcookie($cookie_name, $cookie_value, $cookie_expire, "/", $cookie_domain, 0);
- header( "Location: strona.html");
- exit;
- ?>
- \\Plik html \/
- <?if ($auth != "ok") {
- header( "Location: http://kallosz.clik.pl");
- exit;
- }?>
- <head>
- </head>
- <p aling="center">Jestes na stronie testowej. jesli widzisz ten komunikat to zostales zalogowany poprawnie :)</p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement