";
#var_dump($postData); // php://input
#var_dump($_POST);
print_r(urldecode($postData));
$myfile = fopen("receive_aijiati.txt", "a") or die("Unable to open file!");
#fwrite($myfile, "Got it: " . json_encode($postData) . "\n");
fwrite($myfile, "Got it: " . urldecode($postData) . "\n"); #解決亂碼問題
#fwrite($myfile, "Got it: " . $_POST . "\n");
fclose($myfile);
/*
$data = json_decode(file_get_contents('php://input'), true);
$fp = fopen('receive_aijiati.txt', 'a+');
fwrite($fp, print_r($data, true));
echo json_encode($data);
*/
/*
$url_array = Array("getMd5Token" => "http://192.168.20.65/api/postandsave/2.php",
"getAccessToken" => "http://139.196.43.134:61088//zaagtech-1.0.0/iotinterface/getAccessToken",
"getSessionToken" => "http://139.196.43.134:61088//zaagtech-1.0.0/iotinterface/getSessionToken",
"getElvByCompany" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getElvByCompany",
"getElvInfo" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getElvInfo",
"getElvReport" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getElvReport",
"getRunTime" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getRunTime",
"getFault" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getFault",
"getEvent" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getEvent",
"getHisRuntime" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getHisRuntime",
"getHisFault" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getHisFault",
"getHisEvent" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getHisEvent",
"getMaintainList" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getMaintainList",
"getFaultList" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getFaultList",
"getElevatorParameter" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getElevatorParameter",
"getDeviceRunInfo" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getDeviceRunInfo",
"getPreviewURLsByImei" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/getPreviewURLsByImei",
"setWarningPost" => "http://139.196.43.134:61088/zaagtech-1.0.0/iotinterface/setWarningPost",
"setTestAlarm" => "http://localhost:61096/test/setTestAlarm"
);
echo json_encode($url_array);
*/
//echo '{"code":1,"msg":"the API!"}';
/*
if ($data == ""){
echo "0000";
}else{
echo "1111" . $data;
}
*/
?>