您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

查询快递网点实例

2025/4/7 12:49:49发布15次查看
快递100物流查询
官方文档中只能返回html的接口 也可以返回json              
php代码
/** * @desc 获取快递信息 * @param string $code 快递编码 * @param string $invoice 快递单号 * @return mixed $result( 'status','info','state','data' ) */ function getexpressdelivery($code,$invoice){ $result = array('status'=>0,'info'=>'未知错误'); $url = "http://m.kuaidi100.com/query?type={$code}&postid={$invoice}&id=1&valicode=&temp=".rand(1,710); $body = file_get_contents($url); //fixme $body = json_decode($body,true); $result['status'] = $body['status'] == 200 ? 1 : 0; $result['info'] = $body['message']; isset($body['data']) && ($result['state']=$body['state']) && ($result['data'] = $body['data']) ; return $result; }
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product