I need some help with it... it won't work. I'm using cURL through shellexec() and I consistently get a 10002 Hard Error returned from the UPS Server. Below is my code...
<?php
$data = "<?xml version=”1.0”?>
<AccessRequest xml:lang=”en-US”>
<AccessLicenseNumber>xxxxxxx</AccessLicenseNumber>
<UserId>xxxxx</UserId>
<Password>xxxxxx</Password>
</AccessRequest>
<?xml version=”1.0”?>
<TrackRequest xml:lang=”en-US”>
<Request>
<TransactionReference>
<CustomerContext></CustomerContext>
<XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<RequestAction>Track</RequestAction>
<RequestOption>activity</RequestOption>
</Request>
<ShipmentIdentificationNumber>1Z77X41X0243916602</ShipmentIdentificationNumber>
</TrackRequest>";
$data = urlencode ($data);
$data = str_replace (" ", "", $data);
$date = str_replace ("\n", "", $data);
$command = "curl -d \"" . $data . "\" https://wwwcie.ups.com/ups.app/xml/Track";
$output = shell_exec ($command);
print ($output);
?>
You can see the error message it returns here:
http://superwormy.phpwebhosting.com/testfile_shellexec.php