<?php
function sendsms($mobile,$message){
$user="vinith";
$sendername="SMSTXT";
$apiKey = 'c928490a-3286-4a39-b766-4d04a44d90e3'; 
$headers = array(
     'Authorization: '.$apiKey
);
$curl = curl_init();
$url="http://sms.messageindia.in/sendSMS";
curl_setopt_array($curl, array(
  CURLOPT_URL => "".$url."?username=".$user."&sendername=".$sendername."&smstype=TRANS&numbers=".$mobile."&message=".$message."&apikey=".$apiKey."",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_SSL_VERIFYHOST => 0,
  CURLOPT_HTTPHEADER=>$headers,
  CURLOPT_SSL_VERIFYPEER => 0,
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  //echo "cURL Error #:" . $err;
} else {
  //echo $response; 
}
}
?>