PHP code example of michelmelo / dpd-track-trace

1. Go to this page and download the library: Download michelmelo/dpd-track-trace 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/ */

    

michelmelo / dpd-track-trace example snippets


'providers' => array(
    // ...
    michelmelo\dpdtracking\DpdTrackingServiceProvider::class,
)


use michelmelo\dpdtracking\DpdTracking;

$dpd = new DpdTracking();
$res = $dpd->trackObjects(['09711514666666V', 'LX123456789PT']);
var_dump($res);

/*
output:
array:1 [
  "09711514666666V" => array:11 [
    0 => array:5 [
      0 => "410"
      1 => "2020/04/06 09:32"
      2 => "Envio em armazém"
      3 => ""
      4 => ""
    ]
    1 => array:5 [
      0 => "403"
      1 => "2020/04/04 18:27"
      2 => "Retorno armazém (pára AEP)"
      3 => ""
      4 => ""
    ]
  ]
]
*/

php artisan vendor:publish