elektronisk-kadaver-tidtaki.../passing.php
2024-11-05 12:53:41 +01:00

17 lines
432 B
PHP

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