I am looking for a PHP based solution for taking the XML returned from the USPS Web Tools APIs - which includes a base64 encoded TIF or PDF image - and prints the label to the default printer. For information on the APIs -- visit
<[login to view URL]>
I need label Option 1 printed. What I want is a PHP class that calls the USPS API (passing the XML values as stated in the guide) and results in the label being printed on the default printer. The default printer will be installed on the server where the script is being run. The server will run Linux (Ubuntu 6.06) with the XAMPP LAMP stack.
## Deliverables
A complete an fully functional PHP class that:
1) Accepts the ship to values for name, addresses, city, state, zip code
2) Calls the USPS Web Tools API for delivery confirmation labels
3) When the result is returned from USPS, the class prints the label on the default printer
4) Returns the USPS tracking number to the calling module
## Platform
Code must be PHP 4.X -- platform independent (will be running on Linux/Unix).