PHP code example of jayin / kuaidi
1. Go to this page and download the library: Download jayin/kuaidi 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/ */
jayin / kuaidi example snippets
$info = \Kuaidi\Kuaidi::query('yuantong', '882******15');
echo json_encode($info);
array(11) {
["message"]=>
string(2) "ok"
["nu"]=>
string(12) "2299***1653"
["companytype"]=>
string(8) "shentong"
["ischeck"]=>
string(1) "1"
["com"]=>
string(8) "shentong"
["updatetime"]=>
string(19) "2016-08-28 01:42:45"
["status"]=>
string(3) "200"
["condition"]=>
string(3) "F00"
["codenumber"]=>
string(12) "229****1653"
["data"]=>
array(8) {
[0]=>
array(4) {
["time"]=>
string(19) "2016-08-01 18:15:15"
["location"]=>
string(0) ""
["context"]=>
string(36) "已签收,签收人是: 本人签收"
["ftime"]=>
string(19) "2016-08-01 18:15:15"
}
[1]=>
array(4) {
["time"]=>
string(19) "2016-08-01 14:40:14"
["location"]=>
string(0) ""
["context"]=>
string(71) "广东广州xxxxx的派件员 华师北 正在派件"
["ftime"]=>
string(19) "2016-08-01 14:40:14"
}
}
["state"]=>
string(1) "3"
}