tags:

views:

1610

answers:

5

Does anyone know of a freeware shipping calculator for PHP? I do not want anything too fancy, and it can be compatible with any of the major US domestic shipping services.

If anyone knows of one that is a plugin for CodeIgniter that would be nice.

Travis

+7  A: 

Usually services like this are based on web services offered from the various couriers. You would send the weight and dimensions of the box you want to ship to their web service, and they would return a corresponding shipping price. Each couriers API would be different. I'm not sure if there are any libraries that aggregate all these services together, but I've never seen one. Since prices can change at any time, you pretty much have to use some kind of web service to access this information. That is, unless you are Amazon sized and have preexisting arrangements for pricing rates on shipping with the various couriers. Just from a quick lookup, here is some of the services that FedEx offers.

Kibbee
"Each couriers API would be different. I'm not sure if there are any libraries that aggregate all these services together, but I've never seen one."There's a market there. Wouldn't be hard for some C#/Java+Soap/xmlrpc gurus to cook something up!
Draemon
Oh, probably, but from my experience, there isn`t much work to do to call the web service. Throw a simple querystring type url at their server with parameters for weight and size, and get a couple values back. Something you could probably do yourself in an afternoon.
Kibbee
Having worked with FedEx's API before I can say that it is pretty nice.
jtyost2
A: 

If you want to save yourself some time, I wrote a PHP Shipping Rates Calculator that supports UPS, US Mail, and FedEx. It is available here: http://www.sonicode.com/php_shipping_rates_calculator.php

What is the etiquette on plugging your own products?
alex
+2  A: 

If you sign up for a free account at eship.purolator.com and they have sample code that can be implemented into any website for anything you could think of.

https://eship.purolator.com/SITE/resourcecentre/samplecode.aspx

-James

+1  A: 

Simple calculator for UPS, that does not require a UPS account to get rates: http://www.geekpedia.com/tutorial213_Creating-a-UPS-Shipping-Calculator.html

Jon
+1  A: 

If you don't want to write your own code and use the same API for multiple carriers I suggest checking out RocketShipIt. It is really nice, but it isn't free.

http://rocketship.it