Track UPS packages with ColdFusion. Simple skeleton.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfsavecontent variable= "x"> | |
<?xml version="1.0"?> | |
<AccessRequest xml:lang='en-US'> | |
<AccessLicenseNumber></AccessLicenseNumber> | |
<UserId></UserId> | |
<Password></Password> | |
</AccessRequest> | |
<?xml version="1.0"?> | |
<TrackRequest> | |
<TrackingNumber>1ZA478X20198248503</TrackingNumber> | |
</TrackRequest> | |
</cfsavecontent> | |
<cfhttp url="https://wwwcie.ups.com/ups.app/xml/Track" method="post" result="local.result"> | |
<cfhttpparam type="xml" name="data" value="#x#"> | |
</cfhttp> | |
<!--- tracking ---> | |
<cfdump var = "#XmlParse(local.result.filecontent).TrackResponse.Shipment.Package.Activity.Status.StatusType.Description.XmlText#" top="9999" /> | |
<!--- error ---> | |
<cfdump var = "#XmlParse(local.result.filecontent).TrackResponse.Response.Error.ErrorDescription.XmlText#" top="9999" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment