Send & receive SMS via API
own application
Alerts, notifications & reminders
Manage contacts
Custom reports
own sales funnel reports
Automation workflow
Template system
function make_xml() { $xml=""; return $xml; } { $input_xml=make_xml(); $url =""; $ch = curl_init($url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('content-type: text/xml; charset=utf-8')); curl_setopt($ch, CURLOPT_POSTFIELDS, $input_xml); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3000); $output = curl_exec($ch); /*** Close the handle */ curl_close($ch); $xml = simplexml_load_string($output); echo $Code =((string) $xml->ResponseDetails[0]['Code']); echo $status = ((string) $xml->ResponseDetails[0]['Status']); echo $Code_Description = ((string) $xml->ResponseDetails[0]['Description']); print_r($input_xml); echo $output; } FirstName
String xml:"" public void CallMethod(string url, string xml) { try { byte[] bytes = Encoding.UTF8.GetBytes(xml); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = "POST"; request.ContentLength = bytes.Length; request.ContentType = "text/xml"; using (Stream requestStream = request.GetRequestStream()) { requestStream.Write(bytes, 0, bytes.Length); } HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream resStream = response.GetResponseStream(); StreamReader rdStreamRdr = new StreamReader(resStream); if (response.StatusCode != HttpStatusCode.OK) { string message = String.Format("POST failed. Received HTTP {0}", response.StatusCode); throw new ApplicationException(message); } else { string message = rdStreamRdr.ReadToEnd(); } } catch {} FirstName