💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
>[info]### 请求方式 GET(php) ```php $host = "http://www.kemanduo.net/v2/api/logistics/search"; //API接口地址 $appcode = 'XXXXXXX'; //替换成自己的appcode $no = 'XXXXXXX';//物流单号 $type = 'XXXX';//物流公司编号 $headers = array(); array\_push($headers, "Authorization:APPCODE ".$appcode); if (!empty($type)) { $querys = "no=".$no."&type=".$type; //参数写在这里 } else { $querys = "no=".$no; //参数写在这里 } $url = $host . "?" . $querys; //url拼接 $curl = curl_init(); curl\_setopt($curl, CURLOPT\_CUSTOMREQUEST, $method); curl\_setopt($curl, CURLOPT\_URL, $url); curl\_setopt($curl, CURLOPT\_HTTPHEADER, $headers); curl\_setopt($curl, CURLOPT\_FAILONERROR, false); curl\_setopt($curl, CURLOPT\_RETURNTRANSFER, true); curl\_setopt($curl, CURLOPT\_HEADER, false); // curl\_setopt($curl, CURLOPT\_HEADER, true);// 如不输出json, 请打开这行代码,打印调试头部状态码。 // 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误 if (1 \== strpos("$" . $host, "https://")) { curl\_setopt($curl, CURLOPT\_SSL\_VERIFYPEER, false); curl\_setopt($curl, CURLOPT\_SSL\_VERIFYHOST, false); } $result \= curl\_exec($curl);//返回json字符串 ``` >[warning]## **3.2返回参数** >>[warning]3.2.1 参数示例(json字符串) ```php {"number":"70007163899904","type":"HTKY","list":[{"time":"2019-08-01 23:10:55","status":"\u5ba2\u6237\u5df2\u53d6\u4ef6\uff0c\u63d0\u8d27\u70b9\uff1a\u3010\u767e\u4e16\u90bb\u91cc\u3011 \u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\uff0817666558111 \u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\uff09"},{"time":"2019-08-01 16:33:30","status":"\u3010\u5e7f\u5dde\u5e02\u3011\u60a8\u7684\u6d3e\u4ef6\u5df2\u9001\u8fbe\u81f3\u3010\u3011\u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\uff0c\u8bf7\u5c3d\u5feb\u524d\u5f80\u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\u9886\u53d6\u60a8\u7684\u5305\u88f9\uff0c\u8054\u7cfb\u7535\u8bdd:17666558111"},{"time":"2019-08-01 16:33:25","status":"\u6d3e\u4ef6\u9001\u8fbe\u3010\u767e\u4e16\u90bb\u91cc\u3011\u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\uff0c\u8bf7\u524d\u5f80\u68e0\u4e0b\u8857\u9053\u68e0\u4e1c\u4e30\u4e50\u5e02\u573a\u6b63\u540e\u95e8\u767e\u4e16\u5feb\u9012\u9886\u53d6\u60a8\u7684\u5305\u88f9\uff0c\u8054\u7cfb\u7535\u8bdd\uff1a17666558111"},{"time":"2019-08-01 15:59:11","status":"\u5e7f\u5dde\u5e02\u3010\u5e7f\u5dde\u5929\u6cb3\u533a\u4e03\u90e8\u3011\uff0c\u3010\u5ed6\u6b23\/17666558111\u3011\u6b63\u5728\u6d3e\u4ef6"},{"time":"2019-08-01 15:58:11","status":"\u5230\u5e7f\u5dde\u5e02\u3010\u5e7f\u5dde\u5929\u6cb3\u533a\u4e03\u90e8\u3011"},{"time":"2019-08-01 14:01:35","status":"\u5e7f\u5dde\u5e02\u3010\u5e7f\u5dde\u9ec4\u57d4\u8f6c\u8fd0\u4e2d\u5fc3\u3011\uff0c\u6b63\u53d1\u5f80\u3010\u5e7f\u5dde\u5929\u6cb3\u533a\u4e03\u90e8\u3011"},{"time":"2019-08-01 13:33:59","status":"\u5230\u5e7f\u5dde\u5e02\u3010\u5e7f\u5dde\u9ec4\u57d4\u8f6c\u8fd0\u4e2d\u5fc3\u3011"},{"time":"2019-07-31 05:39:44","status":"\u5317\u4eac\u5e02\u3010\u5317\u4eac\u8f6c\u8fd0\u4e2d\u5fc3\u3011\uff0c\u6b63\u53d1\u5f80\u3010\u5e7f\u5dde\u9ec4\u57d4\u8f6c\u8fd0\u4e2d\u5fc3\u3011"},{"time":"2019-07-31 03:46:51","status":"\u5230\u5317\u4eac\u5e02\u3010\u5317\u4eac\u8f6c\u8fd0\u4e2d\u5fc3\u3011"},{"time":"2019-07-30 15:47:51","status":"\u5317\u4eac\u5e02\u3010\u91d1\u5b9d\u8857\u5206\u90e8\u3011\uff0c\u3010\u64cd\u4f5c\u90e8\/15313009609\u3011\u5df2\u63fd\u6536"}],"deliverystatus":"3","issign":"1","expName":"\u767e\u4e16\u5feb\u9012","expSite":"www.htky365.com ","expPhone":"95320","logo":"http:\/\/img3.fegine.com\/express\/htky.jpg","courier":"","courierPhone":""} ``` >[danger] 经json解密后 ```php { "number":"70007163899904", //物流单号 "type":"HTKY", //物流公司编号 "list":\[ //物流详细轨迹信息         {             "time":"2019-08-01 23:10:55",             "status":"客户已取件,提货点:【百世邻里】 棠下街道棠东丰乐市场正后门百世快递(17666558111 棠下街道棠东丰乐市场正后门百世快递)"         },         {             "time":"2019-08-01 16:33:30",             "status":"【广州市】您的派件已送达至【】棠下街道棠东丰乐市场正后门百世快递,请尽快前往棠下街道棠东丰乐市场正后门百世快递领取您的包裹,联系电话:17666558111"         },         {             "time":"2019-08-01 16:33:25",             "status":"派件送达【百世邻里】棠下街道棠东丰乐市场正后门百世快递,请前往棠下街道棠东丰乐市场正后门百世快递领取您的包裹,联系电话:17666558111"         },         {             "time":"2019-08-01 15:59:11",             "status":"广州市【广州天河区七部】,【廖欣/17666558111】正在派件"         },         {             "time":"2019-08-01 15:58:11",             "status":"到广州市【广州天河区七部】"         },         {             "time":"2019-08-01 14:01:35",             "status":"广州市【广州黄埔转运中心】,正发往【广州天河区七部】"         },         {             "time":"2019-08-01 13:33:59",             "status":"到广州市【广州黄埔转运中心】"         },         {             "time":"2019-07-31 05:39:44",             "status":"北京市【北京转运中心】,正发往【广州黄埔转运中心】"         },         {             "time":"2019-07-31 03:46:51",             "status":"到北京市【北京转运中心】"         },         {             "time":"2019-07-30 15:47:51",             "status":"北京市【金宝街分部】,【操作部/15313009609】已揽收"         }     \], "deliverystatus":"3", //状态:0快递揽件, 1在途中 ,2正在派送,3已签收,4派送失败 "issign":"1", //1是否签收 "expName":"百世快递", //快递公司名称 "expSite":"www.htky365.com ", //快递公司官网 "expPhone":"95320", "logo":"[http://img3.fegine.com/express/htky.jpg](http://img3.fegine.com/express/htky.jpg)", "courier":"", //快递员 没有则为空 "courierPhone":"" //快递员号码 没有则为空 } ``` ## end