server-webapi-code-08-track.php / php
<?php <?xml version="1.0" encoding="UTF-8" ?> <FDXTrackRequest xmlns:api="http://www.fedex.com/fsmapi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FDXShipRequest.xsd"> <RequestHeader> <AccountNumber>accountNumber</AccountNumber> <MeterNumber>carrier</CarrierCode> </RequestHeader> <PackageIdentifier> <Value>470034028693</Value> <Type>TRACKING_NUMBER_OR_DOORTAG</Type> </PackageIdentifier> <DestinationCountryCode>US</DestinationCountryCode> <DetailScans>1</DetailScans> </FDXTrackRequest> XMLREQUEST; echo "<h3>Request</h3>\n"; echo "<pre>\n"; print_r(simplexml_load_string(</pre>\n"; echo "<h3>Response</h3>\n"; response = callFedEx(response->TrackProfile->SoftError)) { foreach (scanPoint) { echo "{scanPoint->Time} - {scanPoint->City}, {<br>"; } }else { echo "Tracking information not yet available"; } echo "<pre>"; print_r(response); echo "</pre>"; ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.