How to sent personalized sms from php mysql using sms gateway?


I am trying to sent sms from sms gateway using php. It’s sent a sms to one or multiple number. But I want to sent different sms to different mobile no. But No luck.

this code work for me to sent single sms to different mobile no:

$username = "yourusername";

$password = “pass”;
$mobiles = ‘880196******|8801912*****’;
$sms = ‘This is a trial sms. thanks’;
$originator = ‘0184*******’;

echo sendSMS($username, $password, $mobiles, $sms, $originator);

function sendSMS($username, $password, $phone, $message, $originator)
// make sure passed string is url encoded
$message = rawurlencode($message);

$url = "$username&password=$password&mobiles=$phone&sms=$message&unicode=1";           

$c = curl_init(); 
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($c, CURLOPT_URL, $url); 
$response = curl_exec($c); 
return $response;



change $mobiles and $sms.