PHPackages                             repat/shipping-service-provider-check - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. repat/shipping-service-provider-check

ActiveApplication[Utility &amp; Helpers](/categories/utility)

repat/shipping-service-provider-check
=====================================

Simple trial-and-error library for testing which shipping provider a tracking number belongs to

0.2(9y ago)121MITPHPPHP &gt;=5.6.0

Since Jul 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/repat/shipping-service-providers-check)[ Packagist](https://packagist.org/packages/repat/shipping-service-provider-check)[ Docs](https://github.com/repat/shipping-service-provider-check)[ RSS](/packages/repat-shipping-service-provider-check/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (2)Versions (3)Used By (0)

shipping-service-providers-check
================================

[](#shipping-service-providers-check)

This is a PHP package for finding out, which shipping service provider a tracking ID belongs to. Since it's used for Germany the service providers available here are the main focus. Contributions are welcome!

It's theoretically possible that a tracking ID is valid at multiple providers. That's why you get an array back that could contain multiple `true`s.

Blog Article (German):

### Supported Providers

[](#supported-providers)

- DHL
- GLS
- UPS
- Hermes
- [Amazon Logistics](https://www.amazon.com/gp/help/customer/display.html?nodeId=201821690) for MUC/Germany(?)

### How it works

[](#how-it-works)

- Scraping the website, try to enter the tracking ID and see what happens OR
- Checking the format of the tracking ID with [regular expressions](https://en.wikipedia.org/wiki/Regular_expression)

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

[](#installation)

Available via composer on [Packagist](https://packagist.org/packages/repat/shipping-service-provider-check):

`composer require repat/shipping-service-providers-check`

Usage
-----

[](#usage)

Check out `src/ShippingServiceProvidersCheck/default_providers.php` for configuration.

```
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();
```

### Replacing providers and adding your own providers

[](#replacing-providers-and-adding-your-own-providers)

If you want to add your own provider, you can provide `checkAll()` with an array like this. Any contributions are most welcome.

```
// 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}/'
     ],
// ...
```

It's a positive lookup, so you will get `true` if `search_string` was found in the HTML tag `filter`. For information on filters, see [Goutte](https://github.com/FriendsOfPHP/Goutte).

For documentation on regular expressions in PHP see [preg\_match](http://php.net/manual/de/function.preg-match.php).

License
-------

[](#license)

- see [LICENSE](https://github.com/repat/shipping-service-providers-check/blob/master/LICENSE) file

Changelog
---------

[](#changelog)

- 0.2 added regex for tracking ID recognition and amazon logistics as a provider
- 0.1.1 adding your own providers
- 0.1 fixed to working release (dhl, hermes, gls, ups)
- 0.0.1 initial release for testing

Contact
-------

[](#contact)

- Homepage:
- e-mail:
- Twitter: [@repat123](https://twitter.com/repat123 "repat123 on twitter")

[![Flattr this git repo](https://camo.githubusercontent.com/7e3f46a36526479d701ef7f90a0f8c3ac2fbab3087446e2a9fceed75cd1ab802/687474703a2f2f6170692e666c617474722e636f6d2f627574746f6e2f666c617474722d62616467652d6c617267652e706e67)](https://flattr.com/submit/auto?user_id=repat&url=https://github.com/repat/shipping-service-provider-check&title=shipping-service-provider-check&language=&tags=github&category=software)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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 ~6 days

Total

2

Last Release

3568d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/405dab243007488e7e7851422e5864a9312aee36058d60f1e6d623232c4d3131?d=identicon)[repat](/maintainers/repat)

---

Top Contributors

[![repat](https://avatars.githubusercontent.com/u/516807?v=4)](https://github.com/repat "repat (10 commits)")

---

Tags

trackingprovidernumberscraperidshippinggoutteparceldhlupsFedExdpdglshermestntamzl

### Embed Badge

![Health badge](/badges/repat-shipping-service-provider-check/health.svg)

```
[![Health](https://phpackages.com/badges/repat-shipping-service-provider-check/health.svg)](https://phpackages.com/packages/repat-shipping-service-provider-check)
```

###  Alternatives

[shippo/shippo-php

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

1711.8M2](/packages/shippo-shippo-php)[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)[slince/shipment-tracking

A flexible and awesome shipment tracking library for several carriers like DHL eCommerce, USPS, YanWen Express, Epacket, E包裹, E特快, 国际EMS, 快递100

291.6k4](/packages/slince-shipment-tracking)[verbb/shippy

A framework agnostic, multi-carrier shipping library for PHP.

1610.1k1](/packages/verbb-shippy)

PHPackages © 2026

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