PHPackages                             webit/gls-tracking - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. webit/gls-tracking

ActiveLibrary[API Development](/categories/api)

webit/gls-tracking
==================

Web-IT GLS Tracking API

2.0.1(3y ago)1416.3k↓36.2%72MITPHPPHP &gt;=5.3.3

Since Dec 5Pushed 3y ago4 watchersCompare

[ Source](https://github.com/dbojdo/gls-tracking)[ Packagist](https://packagist.org/packages/webit/gls-tracking)[ RSS](/packages/webit-gls-tracking/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (7)Used By (2)

GLS Tracking SDK
================

[](#gls-tracking-sdk)

Installation
------------

[](#installation)

Add the **webit/gls-tracking** into **composer.json**

```
{
    "require": {
        "php":              ">=5.3.2",
        "webit/gls-tracking": "^2.0"
    }
}
```

Configuration / Usage
---------------------

[](#configuration--usage)

### API Factory preparation

[](#api-factory-preparation)

```
use Doctrine\Common\Annotations\AnnotationRegistry;
use Webit\GlsTracking\Api\Factory\TrackingApiFactory;
use Webit\GlsTracking\Model\UserCredentials;

$loader = include __DIR__.'/../vendor/autoload.php';
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));

if (is_file(__DIR__ .'/config.php') == false) {
    throw new \LogicException(
        'Missing required file "examples/config.php". Create it base on "examples/config.php.dist".'
    );
}

$config = require __DIR__ .'/config.php';

$apiFactory = new TrackingApiFactory();
```

### Tracking API

[](#tracking-api)

```
$credentials = new UserCredentials('user', 'pass');

$api = $apiFactory->createTrackingApi($credentials);
$details = $api->getParcelDetails($parcelNo);

/** @var \Webit\GlsTracking\Model\Event $event */
printf("Details of parcel \"%s\"\n", $parcelNo);
foreach ($details->getHistory() as $event) {
    printf(
        "%s - Status: %s (%s), Location: %s, %s (%s)\n",
        $event->getDate(),
        $event->getCode(),
        $event->getDescription(),
        $event->getLocationName(),
        $event->getCountryName(),
        $event->getLocationCode()
    );
}
printf("Received by: %s\n", $details->getSignature());

$pod = $api->getProofOfDelivery($parcelNo);

printf("Proof of delivery filename: %s\n", $pod->getFileName());
file_put_contents('/your/docs/dir/' . $pod->getFileName(), $pod->getFile());
```

### Tracking Url Provider

[](#tracking-url-provider)

```
use Webit\GlsTracking\UrlProvider\TrackingUrlProviderFactory;
$factory = new TrackingUrlProviderFactory();

/** @var array $config */

$username = 'username';

$urlProvider = $factory->createTrackingUrlProvider();

$reference = 'parcel-no';

$url = $urlProvider->getStandardTrackingUrl($reference, 'EN', 'EN');

printf("Url for tracking \"%s\" (encrypted): %s\n", $reference, $url);

$url = $urlProvider->getEncryptedTrackingUrl($credentials, $reference, $config['language']);

printf("Url for tracking \"%s\" (encrypted): %s\n", $reference, $url);

$customerReference = 'customer-ref';
$customerNo = 'customer-no';
$url = $urlProvider->getEncryptedCustomerReferenceTrackingUrl($credentials, $customerReference, $customerNo, $config['language']);

printf("Url for tracking \"%s\" with customer \"%s\": %s\n", $customerReference, $customerNo, $url);
```

### Examples

[](#examples)

To configure the examples:

- Copy ***examples/config.php.dist*** to ***examples/config.php***
- Change the values accordingly

Run:

```
php examples/details.php
php examples/url-provider.php
```

Tests
-----

[](#tests)

### Unit / Integration tests

[](#unit--integration-tests)

```
./vendor/bin/phpunit --testsuite unit
```

### API tests

[](#api-tests)

***Requires valid GLS Tracking API credentials and valid parcel numbers***

Copy **phpunit.xml.dist** to **phpunit.xml** then edit **env** variables accordingly

```
./vendor/bin/phpunit --testsuite api
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~406 days

Recently: every ~507 days

Total

6

Last Release

1420d ago

Major Versions

1.x-dev → 2.0.02017-10-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6cc50814a7b150c2a02d719d33c6e11040a6d0d010b2f986a24794edce7f52f?d=identicon)[dbojdo](/maintainers/dbojdo)

---

Top Contributors

[![dbojdo8x8](https://avatars.githubusercontent.com/u/76156710?v=4)](https://github.com/dbojdo8x8 "dbojdo8x8 (2 commits)")

---

Tags

trackingtracetrackparcelgls

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webit-gls-tracking/health.svg)

```
[![Health](https://phpackages.com/badges/webit-gls-tracking/health.svg)](https://phpackages.com/packages/webit-gls-tracking)
```

###  Alternatives

[gabrielbull/ups-api

PHP UPS API

4642.4M10](/packages/gabrielbull-ups-api)[irazasyed/laravel-gamp

Send analytics data to Google Analytics from Laravel. A package for GA Measurement Protocol API

3361.6M1](/packages/irazasyed-laravel-gamp)[shippo/shippo-php

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

1711.8M2](/packages/shippo-shippo-php)[aerni/laravel-spotify

A Laravel wrapper for the Spotify Web API

209145.6k](/packages/aerni-laravel-spotify)[gavroche/ups-api

PHP UPS API

45613.2k](/packages/gavroche-ups-api)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9738.8k](/packages/sauladam-shipment-tracker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
