Php Code for Transactional SMS Print

  • 1

$ch = curl_init();
$reseller="sales@hostmalabar.com";
$user="your-mail-id:password";
$receipientno="your registered mob no with 91";
$senderID="HTMLBR";
curl_setopt($ch,CURLOPT_URL,  "59.162.167.52/api/MessageCompose");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"reseller=$reseller&user=$user&senderID=$senderID&receipientno=$receipientno&msgtxt=$tempdata&state=0");
$buffer = curl_exec($ch);
if(empty ($buffer))
{ echo " buffer is empty "; }
else
curl_close($ch);

Was this answer helpful?

« Back