TestingRate
‘;
$request .= ‘
$request .= ‘01
$request .= ‘
$request .= ‘
$request .= ‘
$request .=’
$request .=’
02IN
$request .=’LBS
$request .=’
$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;
}
?>




