<?php
//include_once("./db.php");

$data = sendSMS("krranjan105@gmail.com","mrt07ugbit105","9685094177","test12","","");
echo "SMS Response ".$data;

echo "ddsfd";
function sendSMS($id,$pwd,$phone,$text,$sender,$dlrurl) 
{
	$ApiUrl ="https://www.businesssms.co.in/sms.aspx";
	$postdata = "Id=".$id."&Pwd=".urlencode($pwd)."&PhNo=".$phone."&text=".urlencode($text)."&SenderID=".$sender."&DlrUrl=".$dlrurl;                 
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL,$ApiUrl);
	curl_setopt($ch, CURLOPT_POST, 1);
	////
	curl_setopt($ch, CURLOPT_FAILONERROR, true);	
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
	curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "\DSTRootCAX3.crt");
	
	////

	curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$resp=curl_exec($ch);
	if (curl_error($ch)) {
		$resp = curl_error($ch);
	}
	curl_close($ch);
	return $resp;
}
?>