Files
motion/auth.php
2026-02-03 15:01:59 +01:00

13 lines
352 B
PHP

<?php
include('config.inc.php');
if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) ||
$_SERVER['PHP_AUTH_USER'] !== $inc_username || $_SERVER['PHP_AUTH_PW'] !== $inc_password) {
header('WWW-Authenticate: Basic realm="Protected Area"');
header('HTTP/1.0 401 Unauthorized');
echo 'Access denied.';
exit;
}
?>