参数名称 | 参数类型 | 必填 | 默认值 | 示例值 | 备注 |
---|---|---|---|---|---|
page | String | 是 | 0 | 页码 | |
cityName | String | 否 | 北京 | 成都 | 城市 |
inDate | String | 否 | 入住时间,格式为:YYYY-MM-DD(默认2天后) | ||
outDate | String | 否 | 离开时间,格式为:YYYY-MM-DD(默认3天后) | ||
sortKey | String | 否 | recommend | recommend | 排序规则(默认recommend.推荐值排序)recommend:推荐值降序satisfaction:口碑price-asc:起价升序price-desc:起价降序 |
star | String | 否 | 星级TWO:二星级,THREE:三星级,FOUR:四星级,FIVE:五星级,BUDGET:经济型,CONFORT:舒适型,HIGHEND:高档型,LUXURY:豪华型【多个以逗号:‘,’分隔】 | ||
minPrice | String | 否 | 房价最低价 | ||
maxPrice | String | 否 | 房价最高价 | ||
poiKey | String | 否 | 区域关键字可以使用关键字搜索中的displayName(poiKey、poiCode、longitude、latitude四个值需结合使用) | ||
poiCode | Number | 否 | 经纬度对应的编号poi类型值:1-城市,2-行政区,3-商圈,4-景点,7-酒店,12-机场,13-地铁,14-火车站(poiKey、poiCode、longitude、latitude四个值需结合使用)) | ||
longitude | Number | 否 | 经度(poiKey、poiCode、longitude、latitude四个值需结合使用)) | ||
latitude | String | 否 | 维度(poiKey、poiCode、longitude、latitude四个值需结合使用)) | ||
limit | Number | 是 | 10 | 30 | 每页条数,最大30条 |
keyWords | String | 否 | 搜索关键词 |
<?php header('content-type:text/html;charset=utf-8'); $ch = curl_init(); $url = 'https://api.liangmlk.cn?ak=xxxx&appid=231&page=xxxx&limit=xxxx'; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); $res = curl_exec($ch); curl_close($ch); return json_decode($res,true);