整合 UPS OnLine Tools (PHP)

以前寫了一段ASP版本的使用UPS Online Tools API的代碼,下面的是Google Code 裏找到的PHP版本模塊。
ASP版地址:
http://hi.baidu.com/hsg4ok/blog/item/f9d5c695016c5a49d0135e7c.html(現在百度空間已經被無辜的封掉了)

Modules written in PHP to help communicate with UPS shipping API

About

This project was started as we have found there is a need for modules written in PHP to communicate with the UPS Shipping API.

Mark has already written code that calculates UPS shipping rates using the API. This was the first implementation. Now we have a great team of developers that are working hard to bring you a complete framework for all of the UPS services.

The plan for this project is to create reusable code for use with all of the UPS shipping tools through thier XML API.

This project will eventually cover all of these UPS API tools.

  • UPS Tracking Tool
  • UPS Signature Tracking
  • UPS Rates & Service Selection Tool
  • UPS Address Validation Tool
  • UPS File Download for Quantum View
  • UPS Shipping Tool
  • UPS Time in Transit Tool
  • UPS Trade Ability

Status

Usage

Here are the following usages for the UPS modules. As of right now there are only two modules created in the release version.

Requirements

PHP4 or PHP5 with cURL(libcurl) installed and enabled.

UPS Rate Selection

require("upsRate.php");
$myRate
= new upsRate('accessnumber','username','password','shippernumber');
echo $myRate
->getRate('fromzip','tozip',"service",length,width,height,weight);

UPS Tracking

require("upsTrack.php");
$myRate
= new upsTrack('accessnumber','username','password');
http
://ups-php.googlecode.com/svn/trunk/array = $myRate->getTrack('TrackingNumber');

Beta Code

If you want more functionality or want to see what is coming in the next versions of ups-php, check out our svn at:

http://ups-php.googlecode.com/svn/trunk/

We are working diligently on the next version and want to make it a complete implementation of the UPS API. This is a very active project so check back often.

Featured Downloads:
UPS-PHP-v0.2.tar.gz
UPS-PHP-v0.2.zip
發佈了30 篇原創文章 · 獲贊 1 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章