diff --git a/radar/update.php b/radar/update.php deleted file mode 100644 index c86cc3b..0000000 --- a/radar/update.php +++ /dev/null @@ -1,43 +0,0 @@ - 180) { - http_response_code(400); - exit("Invalid angle"); -} - -// Bestand met radar data -$file = __DIR__ . "/radar.json"; - -// Bestaande data laden -$data = []; -if (file_exists($file)) { - $json = file_get_contents($file); - $data = json_decode($json, true); - if (!is_array($data)) $data = []; -} - -// Opslaan per hoek -$data[$hoek] = [ - "afstand" => $afstand, - "tijd" => time() -]; - -// Terugschrijven -file_put_contents($file, json_encode($data)); - -echo "OK";