This commit is contained in:
Trygve
2025-10-31 01:45:41 +01:00
parent 5b62326c42
commit 2aff55b50d
10 changed files with 21 additions and 22 deletions

View File

@@ -1,18 +1,17 @@
<?php
$documentRoot = $_SERVER['DOCUMENT_ROOT'];
print_r($documentRoot);
$hash = file_get_contents("$documentRoot/data/hash.txt");
include("$documentRoot/data/hash.php");
$method = $_SERVER['REQUEST_METHOD'];
if ($method == "POST") {
$password = $_POST['password'];
if (!password_verify($password, $hash)) {
http_response_code(response_code: 401);
}
else {
http_response_code(response_code: 200);
}
}
else {
}else {
http_response_code(response_code: 405);
}