PHP Classes

File: how-to

Recommend this page to a friend!
  Classes of Sergey Shilko   UPS XML Package Tracking   how-to   Download  
File: how-to
Role: Example script
Content type: text/plain
Description: How-to-use
Class: UPS XML Package Tracking
Get tracking information about an UPS shipment
Author: By
Last change: Added contacts (ICQ)
Date: 17 years ago
Size: 879 bytes
 

Contents

Class file image Download
UPS XML Package Tracking Tool [example]:#
#########################################
Author: Sergey Shilko , ICQ 201821805 #
#########################################

        include 'ups_tracker.class.php';


            $n = $_GET['n']; //UPS number to track
            $foo = new UPS_XML_PACKAGE_TRACKER();
            $foo->setActivity('activity'); //if 0 , it will display only last status
            $foo->settTackingNumber($n);
            $foo->request_init($ups_userid,$ups_xml_access_key,'hell_world');
            $foo->send_request();
            $response = $foo->getResponseData();


            $bar = new UPS_XML_PACKAGE_TRACKER_HTML_RESPONSE();
            $bar->init($response,$n);
            $bar->html();
            $result = $bar->gethtml();
            #$render->assign("result", $result); //smarty :)
            echo $result;