PHP code example of zhlhuang / express

1. Go to this page and download the library: Download zhlhuang/express library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zhlhuang / express example snippets


use Zhlhuang\Express\Express;

$express = new Express();
$express->query('jd', '78785333107', 'json');

use Zhlhuang\Express\Express;

//快递100免费版已不可调用,建议使用快递鸟
$kuaidiFree = new KuaidiFree();
//实例化企业版本的对象
$kuaidiCompany = new KuaidiCompany([
    'customer' => 'customercustomer',
    'key'      => 'keykeykey'
]);
//实例化聚合数据
$juheExp = new JuheExp([
    'key'      => 'keykeykey'
]);

//实例化快递鸟,支持申通,圆通,中通免费
$Kdniao = new Kdniao([
    'EBusinessID' => '123',
    'key'         => 'key-123-123'
]);

$express = new Express([$Kdniao, $kuaidiCompany, $juheExp]);
$express->query('jd', '78785333107', 'json');