PHP code example of repat / shipping-service-provider-check
1. Go to this page and download the library: Download repat/shipping-service-provider-check 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/ */
repat / shipping-service-provider-check example snippets
use repat\ShippingServiceProvidersCheck\Check;
$check = new Check($trackingId);
// checks all providers, returns an array like
// [
// "dhl" => true,
// "gls" => false,
// ...
// ]
$check->checkAll();
// replacing providers or with your own providers, see below
$check->checkAll($extraProviders);
// gets all available providers
$check->getProviders();
// online check
"SPO" => [
'base_url' => "http://example.com/tracking_id=",
'search_string' => 'This is the string that will be looked for',
'filter' => 'HTML tag to look for',
],
// format check
"SPF" => [
'regex' => '/[foo]{1}/'
],
// ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.