I aam trying to add the ability to print a shipping label from a web-based aapplication I build. I will be using USPS. The instructions say that I need to generate a request like:
[url]http://.....ShippingAPITest.dll?API=[/url][API_Name]&XML=[XML_String_containing_User_ID_and_Password]"
The XML_String would be a XML like:
<DeliveryConfirmationV2.0Request USERID="xxxxxxx" PASSWORD="xxxxxxxx">
<Option>3</Option>
<ImageParameters></ImageParameters>
<FromName>John Smith</FromName>
<FromFirm>ABC Corp.</FromFirm>
<FromAddress1>Ste 4</FromAddress1>
<FromAddress2>6406 Ivy Lane</FromAddress2>
<FromCity>Greenbelt</FromCity>
<FromState>MD</FromState>
<FromZip5>20770</FromZip5>
<FromZip4>4354</FromZip4>
<ToName>Jane Smith</ToName>
<ToFirm>XYZ Corp.</ToFirm>
<ToAddress1>Apt 303</ToAddress1>
<ToAddress2>4411 Romlon Street</ToAddress2>
<ToCity>Beltsville</ToCity>
<ToState>MD</ToState>
<ToZip5>20705</ToZip5>
<ToZip4>5656</ToZip4>
<WeightInOunces>22</WeightInOunces>
<ServiceType>Parcel Post</ServiceType>
<ImageType>TIF</ImageType>
</DeliveryConfirmationV2.0Request>
How do I concert the XML to the XML string to send to their server. And secondly, do I sent the string with "curl"?