PostExample.php
Dosyayı İndir
<?php
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json; charset=utf-8');
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
die ("{ \"responseCode\" : 102, \"responseMessage\" : \"POST ile çağrılmalı\" }" );
}
$input=file_get_contents("php://input");
$object=json_decode($input);
//$output=str_replace("\"","\\\"",$input);
//$output=str_replace("{","\{",$output);
//$output=str_replace("}","\}",$output);
$output=$object->{'objectName'};
echo
"{
\"responseCode\" : 0,
\"responseMessage\" : \"Başarıyla güncellendir\"
\"responseValue\" : \"$output\"
}";
?>
Dosyayı İndir