این رو کسی میتونه به یه فرمت دیگه غیر از جیسون تغییر بده
هرچیزی که بشه باهاش توی .net استفاده کرد
البته اینو بپرسم که همین فرمت رو میتونم توی .net کار کنم؟
اینم کد
<?php
$from="tbz";
$to="thr";
$date="96/04/25";
$jsonData =
array(
"from" => "$from",
"to" => "$to",
"fromDate" => "$date",
"adult" => "1",
"child" => "0",
"infant" => "0"
);
$jsonDataEncoded = json_encode($jsonData);
//echo $jsonDataEncoded;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.test.com/api.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"data=$jsonDataEncoded");
curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
//print_r($server_output);
print_r(json_decode($server_output));
?>