PHPackages                             tudouer/express - 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. tudouer/express

ActiveLibrary

tudouer/express
===============

支持快递鸟、快递100的快递查询SDK

1.0.2(3y ago)0141MITPHP

Since Apr 26Pushed 2y agoCompare

[ Source](https://github.com/todouer/express)[ Packagist](https://packagist.org/packages/tudouer/express)[ RSS](/packages/tudouer-express/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

 Express
=========

[](#-express-)

支持快递鸟、快递100的快递查询SDK

[![Build Status](https://camo.githubusercontent.com/7aecb856fe535a1297aedcd9d50773f935092be0ffe6abc4a8e7bd7560d4b4f9/68747470733a2f2f7472617669732d63692e6f72672f696e626a6f2f657870726573732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/inbjo/express)[![StyleCI build status](https://camo.githubusercontent.com/50ccf44ccbb3ea9cd6cbdfef0c979945b0960f20362769a591e8ba28b2132428/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3137383737393336362f736869656c64)](https://github.styleci.io/repos/178779366)[![Latest Stable Version](https://camo.githubusercontent.com/5789fbaf515783b45784ff2e06544844450c1469745d83b6567210c1bfe8de22/68747470733a2f2f706f7365722e707567782e6f72672f666c65782f657870726573732f762f737461626c65)](https://packagist.org/packages/flex/express)[![Total Downloads](https://camo.githubusercontent.com/3cdfbe675ce1ba935e92a2658b42f810c7f8ed3d705a03fc1d3296796d1c5ec9/68747470733a2f2f706f7365722e707567782e6f72672f666c65782f657870726573732f646f776e6c6f616473)](https://packagist.org/packages/flex/express)[![License](https://camo.githubusercontent.com/e3bbbb235966f5c5cf8178a90f052cc1fc75b1aa48557fbb741cb679982386c0/68747470733a2f2f706f7365722e707567782e6f72672f666c65782f657870726573732f6c6963656e7365)](https://packagist.org/packages/flex/express)

安装
--

[](#安装)

```
$ composer require flex/express -vvv
```

配置
--

[](#配置)

在使用本扩展之前，你需要去 [快递100](https://www.kuaidi100.com/openapi/applyapi.shtml) 或者 [快递鸟](http://www.kdniao.com/reg) 注册申请，获取到APP\_id和APP\_key。

Usage
-----

[](#usage)

### 快递100

[](#快递100)

```
use Flex\Express\Express100;

$express = new Express100('app_id','app_key');
$info = $express->track($tracking_code, $shipping_code, $phone); //快递单号 物流公司编号 收件人手机号(顺丰必填 其他快递选填)
```

示例:

```
{
    "message": "ok",
    "nu": "888888888888",
    "ischeck": "1",
    "condition": "F00",
    "com": "shunfeng",
    "status": "200",
    "state": "3",
    "data": [
        {
            "time": "2019-03-08 19:11:51",
            "ftime": "2019-03-08 19:11:51",
            "context": "[安高广场速运营业点]快件已发车"
        },
        {
            "time": "2019-03-08 18:56:12",
            "ftime": "2019-03-08 18:56:12",
            "context": "[安高广场速运营业点]快件在【合肥蜀山区安高广场营业点】已装车,准备发往 【合肥经开集散中心】"
        },
        {
            "time": "2019-03-08 18:50:52",
            "ftime": "2019-03-08 18:50:52",
            "context": "[安高广场速运营业点]顺丰速运 已收取快件"
        }
    ]
}
```

### 快递鸟

[](#快递鸟)

```
use Flex\Express\ExpressBird;

$express = new ExpressBird('app_id','app_key');
$info = $express->track($tracking_code, $shipping_code，$order_code); //快递单号 物流公司编号 订单编号(选填)
```

示例:

```
{
    "LogisticCode": "8888888888888888",
    "ShipperCode": "YTO",
    "Traces": [
        {
            "AcceptStation": "【四川省直营市场部公司】 取件人: 四川省直营市场部41 已收件",
            "AcceptTime": "2019-03-21 11:03:40"
        },
        {
            "AcceptStation": "【四川省直营市场部公司】 已收件",
            "AcceptTime": "2019-03-21 13:45:01"
        },
        {
            "AcceptStation": "【成都转运中心】 已收入",
            "AcceptTime": "2019-03-21 22:40:01"
        }
    ],
    "State": "3",
    "OrderCode": "",
    "EBusinessID": "100000",
    "Success": true
}
```

### 通用方法

[](#通用方法)

```
use Flex\Express\Express;

$express = new Express($app_id,$app_key,$type); //$type支持类型'express100'、'expressbird'

//快递鸟$additional=['order_code'=>111111] 快递100 $additional=['phone'=>'18899996666']
$info = $express->track($tracking_code, $shipping_code，$additional); ////查询物流 快递单号 额外参数
```

### 在 Laravel 中使用

[](#在-laravel-中使用)

在 Laravel 中使用也是同样的安装方式，配置写在 `config/services.php` 中：

```
    .
    .
    .
     'express' => [
        'id' => env('EXPRESS_ID'),
        'key' => env('EXPRESS_KEY'),
        'type' => env('EXPRESS_TYPE'),
    ],
```

然后在 `.env` 中配置 `EXPRESS_ID`、`EXPRESS_KEY`、`EXPRESS_TYPE`；

```
EXPRESS_ID=xxxxxxxxxxxxxxxxxxxxx
EXPRESS_KEY=xxxxxxxxxxxxxxxxxxxxx
EXPRESS_TYPE=express100
```

可以用两种方式来获取 `Flex\Express\Express` 实例：

#### 方法参数注入

[](#方法参数注入)

```
    .
    .
    .
    public function edit(Express $express)
    {
        $response = $express->track('888888888','YTO');
    }
    .
    .
    .
```

#### 服务名访问

[](#服务名访问)

```
    .
    .
    .
    public function edit()
    {
        $response = app('express')->track('888888888','YTO');
    }
    .
    .
    .
```

参考
--

[](#参考)

- [快递100接口文档](https://www.kuaidi100.com/openapi/api_post.shtml)
- [快递100快递公司编码](https://blog.csdn.net/u011816231/article/details/53063611)
- [快递鸟接口文档](http://www.kdniao.com/documents)
- [快递鸟快递公司编码](http://www.kdniao.com/documents)

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% 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 ~1215 days

Total

2

Last Release

1364d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6676a9a13bd9bab791e15b4f4d5679a445fad6946ea1200cf420091404f59b40?d=identicon)[tudouer](/maintainers/tudouer)

---

Top Contributors

[![inbjo](https://avatars.githubusercontent.com/u/11854149?v=4)](https://github.com/inbjo "inbjo (13 commits)")[![todouer](https://avatars.githubusercontent.com/u/73217797?v=4)](https://github.com/todouer "todouer (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tudouer-express/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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