jburcher
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Posting XML data
in PHP Coding Help
Posted
--------------------------------------------------
$ch = curl_init("https://wwwcie.ups.com/ups.app/xml/Rate"); // URL of gateway for cURL to post to
curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
curl_setopt($ch, CURLOPT_POSTFIELDS, stripslashes($ups_values)); // use HTTP POST to send form data
$resp = curl_exec($ch); //execute post and get results
curl_close ($ch);
$ups_resp = str_replace("\"", "'",$resp);