<?php
$xml_data ='<request>
<header>
<version>20111128102912</version>
<accountID>27269979</accountID>
<serviceName>GetHotelDetail</serviceName>
<digitalSign>{digitalSign}</digitalSign>
<reqTime>{reqTime}</reqTime>
</header>
<body>
<hotelId>7110</hotelId>
<cs>{cs}</cs>
</body>
</request>';
$URL = "http://tcopenapi.17usoft.com/handlers/hotel/QueryHandler.ashx";
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_MUTE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch); echo $output;
?>
$xml_data ='<request>
<header>
<version>20111128102912</version>
<accountID>27269979</accountID>
<serviceName>GetHotelDetail</serviceName>
<digitalSign>{digitalSign}</digitalSign>
<reqTime>{reqTime}</reqTime>
</header>
<body>
<hotelId>7110</hotelId>
<cs>{cs}</cs>
</body>
</request>';
$URL = "http://tcopenapi.17usoft.com/handlers/hotel/QueryHandler.ashx";
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_MUTE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch); echo $output;
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货