PHPackages                             fringe/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. [HTTP &amp; Networking](/categories/http)
4. /
5. fringe/express

ActiveLibrary[HTTP &amp; Networking](/categories/http)

fringe/express
==============

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

025PHP

Since Oct 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jwxy-knight/express)[ Packagist](https://packagist.org/packages/fringe/express)[ RSS](/packages/fringe-express/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)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 fringe/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

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c5fd189b4eaf8582f1d48b11d8dcda93fee2237d4315545d55cbaba166db2f2d?d=identicon)[jwxy-knight](/maintainers/jwxy-knight)

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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