14 lines
299 B
PHP
14 lines
299 B
PHP
|
<?php
|
||
|
|
||
|
$http_username = $_SERVER['PHP_AUTH_USER'];
|
||
|
$http_password = $_SERVER['PHP_AUTH_PW'];
|
||
|
|
||
|
$auth = (hash_equals($http_password, $password));
|
||
|
|
||
|
if (!$auth) {
|
||
|
header('WWW-Authenticate: Basic realm="ccOS Web Panel"');
|
||
|
header('HTTP/1.0 401 Unauthorized');
|
||
|
die ("Not authorized");
|
||
|
}
|
||
|
|
||
|
?>
|