2017-05-18 31 views
0

我已經在travelpayouts中創建了酒店api並創建了簽名,但是它給出了錯誤代碼3的響應(表示拒絕訪問)請查找我的代碼波紋管。travelpayouts酒店api簽名不起作用

$hash = md5("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxx:2:2017–01–01:2017–05–18:1:USD:192.168.1.1:HKT:ru:20:0"); 
$url = "http://engine.hotellook.com/api/v2/search/start.json"; 
$ch = curl_init(); 
$timeout = 5; 
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_POST, true); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); 
$data = curl_exec($ch) or exit(curl_error($ch)); 
$searchData = json_decode($data, true); 
$search_id = $searchData['search_id']; 
+0

您是否有可能在調用此API時需要提供憑據? – cfnerd

回答