12 lines
356 B
PHP
12 lines
356 B
PHP
<?php
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
$data = json_decode(file_get_contents('php://input'), true);
|
|
|
|
// Uložte hodnotu obličeje (a další data) na serveru
|
|
file_put_contents('data.json', json_encode($data));
|
|
|
|
echo json_encode(['success' => true]);
|
|
} else {
|
|
echo json_encode(['error' => 'Invalid request method']);
|
|
}
|
|
?>
|