I've seen several websites that can detect who is the shipping carrier based on the tracking number. Is there an open library or code somewhere that can help me achieve this?
Preferably PHP but I can probably port it if not.
I've seen several websites that can detect who is the shipping carrier based on the tracking number. Is there an open library or code somewhere that can help me achieve this?
Preferably PHP but I can probably port it if not.
I recently ran into the same need and have started an open source project called Argo: https://github.com/dsposito/argo
Argo determines the shipping carrier and provider (3rd party such as Endicia or Stamps.com) for a given tracking code.
I don't know about library but with some searching I found question similar to yours: http://answers.google.com/answers/threadview/id/207899.html
The FedEX, UPS, USPS and AIRBORNE formats are described very well and it won't be hard to write some static methods in a class to validate against them. But you haven't noted which carriers you want to detect, which country, etc, so it might not be of much help.