PHP code example of trackingmore / trackingmore-sdk-php
1. Go to this page and download the library: Download trackingmore/trackingmore-sdk-php 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/ */
trackingmore / trackingmore-sdk-php example snippets
use Trackingmore\TrackingMoreException;
use TrackingMore\AirWaybills;
use TrackingMore\Couriers;
use TrackingMore\Trackings;
$key = 'your api key';
$response = null;
$couriers = new Couriers($key);
$trackings = new Trackings($key);
$airWaybill = new AirWaybills($key);
try {
//Get all couriers (couriers/all)
$response = $couriers->getAllCouriers();
} catch (TrackingMoreException $e) {
echo $e->getMessage();
}
print_r($response);