<?php

header('Content-Type: text/plain');
header('Allow-Control-Allow-Origin: *');

$myData = file_get_contents("php://input");
$file = fopen("test.txt", "w");

// $data = json_decode($myData, true);
// echo $data['name'];
// echo $data['email'];

// $data = json_decode($data,true);
if(fwrite($file, "$myData")){
    echo 1;
}else{
    echo 2;
}
fwrite($file, '\n');


fclose($file);
