PHP code example of fuchen2020 / express-info
1. Go to this page and download the library: Download fuchen2020/express-info 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/ */
fuchen2020 / express-info example snippets
use Fuchen2020\ExpressInfo\Express;
//快递100开放授权 API Key
$key = '*****************';//客户授权key
$customer = '*****************';//查询公司编号
$exp = new Express($key,$customer);
echo "获取实时快递轨迹:\n";
$response = $exp->getExpressInfo('zhongtong','77110160482518');
echo json_encode($response, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);