Skip to main content

Sample Code

PHP Sample

$xmlcontent=; //String with correctly formatted XML following the spec.

$c = curl_init("");

curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, $xmlcontent);
curl_setopt($c, CURLOPT_HTTPHEADER, array("Content-Type: text/xml"));
//curl_setopt($c, CURLOPT_CAINFO, "cacert.pem"); //We can provide this certfile if needed (We use GeoTrust and/or GoDaddy)
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); //(if you are having problems with the https cert, you can disable checking)
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($c);

echo $result;


C# Sample

string strXML =; //String with correctly formatted XML following the spec.
string result;

WebClient myWebClient = new WebClient();
myWebClient.Headers.Add("Content-Type", "text/xml");
result = myWebClient.UploadString("", strXML);


  • Was this article helpful?