TestingRate

‘;
$request .= ‘3CD84DCF4370E3464115ldcsSummer12‘;
$request .= ‘
01‘;
$request .= ‘Rate Request1.0001Rate‘;
$request .= ‘Shop

MO65301US‘;
$request .= ‘Sedalia

MO65301US‘;
$request .=’Sedalia

MD20724US‘;
$request .=’

02IN20‘;
$request .=’2020
LBS26‘;
$request .=’USD108.5
‘;

$Url = “https://wwwcie.ups.com/ups.app/xml/Rate”;

echo $request;
echo “
>>>”.curl_download($request, $Url);

function curl_download($request, $Url){
// is cURL installed yet?
if (!function_exists(‘curl_init’)){
die(‘Sorry cURL is not installed!’);
}
// OK cool – then let’s create a new cURL resource handle
$ch = curl_init();

// Now set some options (most are optional)

// Set URL to download
curl_setopt($ch, CURLOPT_URL, $Url);

// Should cURL return or print out the data? (true = return, false = print)
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Timeout in seconds
curl_setopt($ch, CURLOPT_TIMEOUT, 10);

curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
// Download the given URL, and return output

$output = curl_exec($ch);
// Close the cURL resource, and free system resources
curl_close($ch);

return $output;
}

?>