PHPackages                             echozzy/logistics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. echozzy/logistics

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

echozzy/logistics
=================

查询快递物流信息

v1.0.3(6y ago)010MITPHPPHP &gt;=7.0

Since Mar 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/echozzy/logistics)[ Packagist](https://packagist.org/packages/echozzy/logistics)[ RSS](/packages/echozzy-logistics/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (5)Used By (0)

 Logistics
===========

[](#-logistics-)

简单便捷查询运单快递信息

### 重构版本

[](#重构版本)

1.0.4

### 支持查询接口平台

[](#支持查询接口平台)

平台次数是否需要快递公司编码[快递100](https://www.kuaidi100.com/openapi/applyapi.shtml)100单/天(免费)Y[快递鸟](http://www.kdniao.com/api-all)3000单/天(免费)Y[聚合数据](https://www.juhe.cn/docs/api/id/43)100次(首次申请)Y[极速数据](https://www.jisuapi.com/api/express)1000次(免费)N[数据智汇](http://www.shujuzhihui.cn/apiDetails?id=1867)100次(免费)N[爱查快递](https://www.ickd.cn/api)无限次(抓取接口, 无法保证数据正确性)N### 配置须知

[](#配置须知)

- 配置文件: Config.php, 修改私有属性的$config数组.
- 只有快递鸟申请后会有两个,一个是用户ID, 填入到app\_secret,另外一个则是api\_key, 填入app\_key, 其他则把申请的key填入到app\_key

### 环境需求

[](#环境需求)

- PHP &gt;= 7.0

### 安装

[](#安装)

```
$ composer require echozzy/logistics -vvv
```

### 使用

[](#使用)

```
use Zzy\Logistics\Logistics
$logistics = new Logistics()
```

### 参数说明

[](#参数说明)

```
array query(string $code, $channels = ['kuaidi100'],$config=[], string $company = '')
array queryByProxy(array $proxy, string $code, $channels = ['kuaidi100'],$config=[], string $company = '')

```

- query 与 queryByProxy 返回数组结构是一样, 只是多了一个参数代理IP
- $proxy - 代理地址 结构: \['proxy' =&gt; '代理IP:代理端口'\]
- $code - 运单号
- $channel - 渠道名称, 可选参数,默认快递鸟.
- $config - 配置参数, 可选参数,默认Config.php自动获取.二维数组,key与channels的key一一对应
- $company - 快递公司 具体看 SupportLogistics 文件

### 快递 100 接口获取物流信息 所有接口返回格式是统一

[](#快递-100-接口获取物流信息-所有接口返回格式是统一)

```
$logistics->query('12313131231', ''); // 第二参数不设,则默认快递鸟接口
$logistics->query('12313131231', 'kuaidi100');
$config = [
    ['app_key' => 'kuaidi100', 'app_secret' => 'kuaidi100', 'vip' => false]
];
$logistics->query('12313131231', ['kuaidi100'],$config);
```

示例:

```
[
   'kuaidi100' => [
       'channel' => 'kuaidi100',
       'status' => 'success',
       'result' => [
           [
               'status' => 200,
               'message'  => 'OK',
               'error_code' => 0,
               'data' => [
                   ['time' => '2019-01-09 12:11', 'description' => '仓库-已签收'],
                   ['time' => '2019-01-07 12:11', 'description' => '广东XX服务点'],
                   ['time' => '2019-01-06 12:11', 'description' => '广东XX转运中心']
               ],
               'logistics_company' => '申通快递',
               'logistics_bill_no' => '12312211'
           ],
           [
               'status' => 201,
               'message' => '快递公司参数异常：单号不存在或者已经过期',
               'error_code' => 0,
               'data' => '',
               'logistics_company' => '',
               'logistics_bill_no' => ''
           ]
       ]
   ]
]
```

### 多接口获取物流信息

[](#多接口获取物流信息)

```
$logistics->query('12313131231');
$config = [
    ['app_key' => 'kuaidi100', 'app_secret' => 'kuaidi100', 'vip' => false],
    ['app_key' => 'ickd', 'app_secret' => 'ickd', 'vip' => false]
];
$logistics->query('12313131231', ['kuaidi100', 'ickd'],$config);
```

示例:

```
[
   'kuaidi100' => [
       'channel' => 'kuaidi100',
       'status' => 'success',
       'result' => [
           [
               'status' => 200,
               'message'  => 'OK',
               'error_code' => 0,
               'data' => [
                   ['time' => '2019-01-09 12:11', 'description' => '仓库-已签收'],
                   ['time' => '2019-01-07 12:11', 'description' => '广东XX服务点'],
                   ['time' => '2019-01-06 12:11', 'description' => '广东XX转运中心']
               ],
               'logistics_company' => '申通快递',
               'logistics_bill_no' => '12312211'
           ],
           [
               'status' => 201,
               'message' => '快递公司参数异常：单号不存在或者已经过期',
               'error_code' => 0,
               'data' => '',
               'logistics_company' => '',
               'logistics_bill_no' => ''
           ]
       ]
   ],
   'ickd' => [
       'channel' => 'ickd',
       'status' => 'success',
       'result' => [
           [
               'status' => 200,
               'message'  => 'OK',
               'error_code' => 0,
                'data' => [
                    ['time' => '2019-01-09 12:11', 'description' => '仓库-已签收'],
                    ['time' => '2019-01-07 12:11', 'description' => '广东XX服务点'],
                    ['time' => '2019-01-06 12:11', 'description' => '广东XX转运中心']
                ],
                'logistics_company' => '申通快递',
                'logistics_bill_no' => '12312211'
           ]
       ]
   ]
]
```

最后
--

[](#最后)

欢迎提出 issue 和 pull request

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

2238d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dde7e75fe7164057b0a0cb97cacfc4ba0ad8cc795aacb86eafe59fb7b272ff55?d=identicon)[echozzy](/maintainers/echozzy)

---

Top Contributors

[![echozzy](https://avatars.githubusercontent.com/u/22166281?v=4)](https://github.com/echozzy "echozzy (7 commits)")

---

Tags

php7

### Embed Badge

![Health badge](/badges/echozzy-logistics/health.svg)

```
[![Health](https://phpackages.com/badges/echozzy-logistics/health.svg)](https://phpackages.com/packages/echozzy-logistics)
```

###  Alternatives

[ddeboer/tesseract

A wrapper for the Tesseract OCR engine

23135.1k](/packages/ddeboer-tesseract)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
