参数名称 | 类型 | 必填 | 说明 |
---|
参数名称 | 类型 | 说明 |
---|---|---|
city | string | 城市代号 |
cityname | string | 城市名称 |
<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here';//你的appkey $url = "https://api.binstd.com/vehiclelimit/city?appkey=$appkey"; $result = curlOpen($url, ['ssl'=>true]); $jsonarr = json_decode($result, true); //exit(var_dump($jsonarr)); if($jsonarr['status'] != 0) { echo $jsonarr['msg']; exit(); } $result = $jsonarr['result']; foreach($result as $val) { echo $val['city'].' '.$val['cityname'].'
'; }
{ "status": "0", "msg": "ok", "result": [ { "city": "beijing", "cityname": "北京" }, { "city": "tianjin", "cityname": "天津" }, { "city": "hangzhou", "cityname": "杭州" }, { "city": "chengdu", "cityname": "成都" }, { "city": "lanzhou", "cityname": "兰州" }, { "city": "guiyang", "cityname": "贵阳" }, { "city": "nanchang", "cityname": "南昌" }, { "city": "changchun", "cityname": "长春" }, { "city": "haerbin", "cityname": "哈尔滨" }, { "city": "wuhan", "cityname": "武汉" }, { "city": "shanghai", "cityname": "上海" }, { "city": "shenzhen", "cityname": "深圳" } ] }
代号 | 说明 |
---|---|
201 | 城市为空 |
202 | 城市不存在 |
210 | 没有信息 |
代号 | 说明 |
---|---|
101 | APPKEY为空或不存在 |
102 | APPKEY已过期 |
103 | APPKEY无请求此数据权限 |
104 | 请求超过次数限制 |
105 | IP被禁止 |
106 | IP请求超过限制 |
107 | 接口维护中 |
108 | 接口已停用 |
名称 | 权限 | 价格 | |
---|---|---|---|
免费套餐 | 5次 | 免费 | |
Level1 | 20000次 | 230.00元 | |
Level2 | 50000次 | 560.00元 | |
Level3 | 70000次 | 760.00元 |
开通账号: