jayin / kuaidi
express query
2.0.0
2016-08-27 17:46 UTC
This package is not auto-updated.
Last update: 2025-01-15 12:17:31 UTC
README
注意该项目依赖的快递100接口已废弃无法使用了
安装
composer require "jayin/kuaidi"
使用
require_once("vendor/autoload.php"); $info = \Kuaidi\Kuaidi::query('yuantong', '882******15'); echo json_encode($info);
正常响应:
array(11) {
["message"]=>
string(2) "ok"
["nu"]=>
string(12) "2299***1653"
["companytype"]=>
string(8) "shentong"
["ischeck"]=>
string(1) "1"
["com"]=>
string(8) "shentong"
["updatetime"]=>
string(19) "2016-08-28 01:42:45"
["status"]=>
string(3) "200"
["condition"]=>
string(3) "F00"
["codenumber"]=>
string(12) "229****1653"
["data"]=>
array(8) {
[0]=>
array(4) {
["time"]=>
string(19) "2016-08-01 18:15:15"
["location"]=>
string(0) ""
["context"]=>
string(36) "已签收,签收人是: 本人签收"
["ftime"]=>
string(19) "2016-08-01 18:15:15"
}
[1]=>
array(4) {
["time"]=>
string(19) "2016-08-01 14:40:14"
["location"]=>
string(0) ""
["context"]=>
string(71) "广东广州xxxxx的派件员 华师北 正在派件"
["ftime"]=>
string(19) "2016-08-01 14:40:14"
}
}
["state"]=>
string(1) "3"
}
错误响应:
array(2) {
["status"]=>
string(3) "201"
["message"]=>
string(60) "快递公司参数异常:单号不存在或者已经过期"
}
快递公司编码
申通=”shentong”
EMS=”ems”
顺丰=”shunfeng”
圆通=”yuantong”
中通=”zhongtong”
韵达=”yunda”
天天=”tiantian”
汇通=”huitongkuaidi”
全峰=”quanfengkuaidi”
德邦=”debangwuliu”
宅急送=”zhaijisong”