Just in case someone needs it, I got the code to work. The following is the "guts"...
$url is the full url you need to call
$xmlrequest is the full formatted XML string the receiver needs
...
build your XML request string
...
$ch = curl_init(); // initialize
curl_setopt($ch, CURLOPT_URL, $url); // set the url
curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
curl_setopt($ch, CURLOPT_POST, 1); // not sure what this one does
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xmlrequest"); // use HTTP POST to send XML data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
### curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response. ###
$xmlresponse = curl_exec($ch); //execute post and get results
curl_close ($ch); //close the curl interface
...
process your XML response
...
|