kluzny / parcurls
A simple utility class to resolve parcel tracking urls
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kluzny/parcurls
Requires
- php: ^7.0
This package is not auto-updated.
Last update: 2025-12-25 06:26:38 UTC
README
ParcUrls ( read as "parcels", so clever ) is a small utility class to help resolve tracking numbers into tracking urls from several of the larger parcel services. This is a direct fork of darkain/php-tracking-urls with the goals of:
- Autoloading
- Namespacing
- Classes, because classes
- Preference of spaces vs tabs
- Access to metadata like carrier
Supported shippers:
- United States Postal Service (USPS)
- United Parcel Service (UPS)
- Federal Express (FedEx)
- OnTrac
- DHL
Install
Note that the package names are lowercase
composer require kluzny/parcurls
Example
Usage:
use kluzny\ParcUrls\Parser; $parser = new Parser("92748963438592543475924253"); echo $parser->url; # https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=92748963438592543475924253 echo $parser->tracker['carrier']; # USPS echo $parser->tracker['description']; # United States Postal Service
Bugs
Feel free to create pull requests, but they must include passing test cases. I'm not particularly interested in maintaining this or any other PHP code.