Download the PHP package sauladam/shipment-tracker without Composer

On this page you can find all versions of the php package sauladam/shipment-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shipment-tracker

Shipment Tracker

A simple tool to scrape the parcel tracking data for DHL, DHL Express, GLS, UPS, FedEx USPS, Swiss Post Service and Austria Post Service

Build Status Total Downloads

Some parcel services give you a really hard time when it comes to registering some kind of merchant or developer account. All you actually want is to simply keep track of a shipment and have an eye on its status. Yes, you could keep refreshing the tracking pages, but sometimes you've just got better stuff to do.

So here's a tool that does this automatically, without any of the developer-account and API mumbo jumbo. It just simply scrapes the website with the tracking information and transforms the data into an easily consumable format for humans and computers. Let me show you how it works!

Installation

Just pull this package in through composer or by adding it to your composer.json file:

Don't forget to run

$ composer update

after that.

Supported Carriers

The following carriers and languages are currently supported by this package:

Basic Usage

And that's it. Let's check if this parcel was delivered:

Possible statuses are:

So where is it right now and what's happening with it?

You can grab an array with the whole event history with $track->events(). The events are sorted by date in descending order. The date is a Carbon object.

What else?

You just want to build up the URL for the tracking website? No problem:

Oh, you need it to link to the english version? Sure thing:

"But wait, what if I need that URL with additional parameteres?" - Well, just pass them:

Other features

Additional details

Tracks and Events both can hold additional details, accessible via e.g. $track->getAdditionalDetails('foo'). Currently, this is only relevant for GLS and UPS:

Data Providers

By default, this package uses Guzzle as well as the PHP Http client (a.k.a. file_get_contents()) to fetch the data. You can pass your own provider if you need to, e.g. if you have the page contents chillin' somewhere in a cache. Just make sure that it implements Sauladam\ShipmentTracker\DataProviders\DataProviderInterface, which only requires a get() method.

Then, you can just pass it to the factory: $dhlTracker = ShipmentTracker::get('DHL', new CacheDataProvider);

If you pass your data provider, it's used by default, but you can swap it out later if you want:

Currently available providers are:

Notes

Please keep in mind that this is just a tool to make your life easier. I do not recommend using it in a critical environment, because, due to the way it works, it can break down as soon as the tracking website where the data is pulled from changes its structure or renames/rephrases the event descriptions. So please use it at your own risk!

Also, there's always a chance that a status can not be resolved because the event description is not known by this package, even though the most common events should be resolved correctly.

Also, the tracking data, therefore the data provided by this package, is the property of the carrier (I guess), so under no circumstances you should use it commercially (like selling it or integrating it in a commercial service). It is intended only for personal use.


All versions of shipment-tracker with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
guzzlehttp/guzzle Version >=3.9
nesbot/carbon Version >=1.20
ext-json Version *
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sauladam/shipment-tracker contains the following files

Loading the files please wait ....