File: /home/dh_ncpy7d/beitarbeersheva.com/campaign/testSMS.php
<?php
///////////////////////////////////////// SMS ///////////////////////////////////////////
$url = 'http://www.smsapi.co.il/Web_API/SendSMS.asmx/SUBMITSMS';
$data = array('XMLString' => '<SMS>
<USERNAME>039229927</USERNAME>
<PASSWORD>ahrv7583</PASSWORD>
<SENDER_PREFIX>ALFA</SENDER_PREFIX>
<SENDER_SUFFIX>negev</SENDER_SUFFIX>
<MSGLNG>HEB</MSGLNG>
<MSG><![CDATA[תודה שהתפנקת במועדון נגב - לחצ/י על הלינק לקופון האישי שלך https://mcnegev.co.il/coupon.php?i=133&u=12348]]></MSG>
<MOBILE_LIST>
<MOBILE_NUMBER>0543341104</MOBILE_NUMBER>
</MOBILE_LIST>
<UNICODE>False</UNICODE>
<USE_PERSONAL>False</USE_PERSONAL>
</SMS>');
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */
echo $result;
}
var_dump($result);
?>