2025-10-31 01:45:41 +01:00

19 lines
496 B
PHP

<?php
$documentRoot = $_SERVER['DOCUMENT_ROOT'];
$control = $_POST['control'];
$runner_id = $_POST['id'];
$time = $_POST['time'];
$password = $_POST['password'];
include("$documentRoot/data/hash.php");
if (!password_verify($password, $hash)) {
http_response_code(response_code: 401);
}
else {
$file = "$documentRoot/data/passering.csv";
$current = file_get_contents($file);
$current .= $control . "," . $runner_id . "," . $time . "\n";
file_put_contents($file, $current);
}