<?php

$to = "8652372200,8082034771";
$msg = "test tamboli";

$user = "tamboli2013"; //your username
$password = "tamboli2013"; //your password
$mobilenumbers = "$to"; //enter Mobile numbers comma seperated
$message = "$msg"; //enter Your Message 
$senderid = "TMBOLI"; //Your senderid
$url = "http://vas.mobilogi.com/api.php";
$message = urlencode($message);
$ch = curl_init();
echo "$user";
if (!$ch) {
    die("Couldn't initialize a cURL handle");
}
$ret = curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);

//http://vas.mobilogi.com/api.php?username=username&password=yourpassword&route=1&sender=senderID&mobile[]=mobilenumber&message[]=TEST 
curl_setopt($ch, CURLOPT_POSTFIELDS, "username=$user&password=$password&route=1&sender=$senderid&to=$mobilenumbers&message=$message");
curl_setopt($ch, CURLOPT_POSTFIELDS, "username=$user&password=$password&route=1&sender=$senderid&mobile[]=$mobilenumbers&message[]=$message");

$ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

//If you are behind proxy then please uncomment below line and provide your proxy ip with port.
// $ret = curl_setopt($ch, CURLOPT_PROXY, "PROXY IP ADDRESS:PORT");



$curlresponse = curl_exec($ch); // execute
if (curl_errno($ch))
    echo 'curl error : ' . curl_error($ch);

if (empty($ret)) {
    // some kind of an error happened
    die(curl_error($ch));
    curl_close($ch); // close cURL handler
} else {
    $info = curl_getinfo($ch);
    curl_close($ch); // close cURL handler
    //echo "<br>";
    echo $curlresponse;    //echo "Message Sent Succesfully" ;
    // }
}
?>
