<?php
$login='admin';
$md5_pass = md5('admin');
if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass)) {
header("WWW-Authenticate: Basic realm=\"Please login! HTTP/1.0 401 Unauthorized");
die;
}
// if logined
echo "OK!...";
?>
Title:
Protect your page by HTTP Authentication: Basic
Description:
<?php $login='admin'; $md5_pass = md5('admin'); if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($...
...
Rating:
4