new
data reciever added
This commit is contained in:
parent
74f4fc8682
commit
12e90e16a9
3
.htaccess
Normal file
3
.htaccess
Normal file
@ -0,0 +1,3 @@
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
|
||||
Header set Access-Control-Max-Age "1000"
|
17
data_reciever.php
Normal file
17
data_reciever.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$datafile = "./data";
|
||||
|
||||
header("Content-Type: text/plain");
|
||||
|
||||
try {
|
||||
$data = file_get_contents("php://input");
|
||||
file_put_contents($datafile, $data);
|
||||
|
||||
date_default_timezone_set("Europe/Moscow");
|
||||
echo date("H:i:s");
|
||||
}
|
||||
catch(Throwable $ex) {
|
||||
echo "ЕГГОГ";
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user