PHP code example of caorulai / ali_express_api
1. Go to this page and download the library: Download caorulai/ali_express_api 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/ */
caorulai / ali_express_api example snippets
// 阿里AppCode
$appCode = "";
// 快递单号
$no = "9897984468520";
// 快递物流公司编码,默认AUTO
$type = "AUTO";
try {
$express = new \Express\Express($appCode);
$messageInfo = $express->getExpressInfo(['NO' => $no, 'TYPE' => $type]);
var_dump($messageInfo);
} catch (Exception $e) {
echo $e->getMessage();
}