Send Message from Website in php

Send Message Using Bhashsms.com to user mobile phone from the website.
 
$api_username = sms_api_username;
$api_userpwd  = sms_api_pwd;
$send_id = SMS_SEND_ID;

$curl = "http://bhashsms.com/api/sendmsg.php"; 

$msg = YOUR MESSAGE; 
$message = urlencode($msg);   

$api_url = $curl . '?' . "user=$api_username&pass=$api_userpwd&sender=$send_id&phone=$to&text=$message&priority=ndnd&stype=normal"; 

$sms = curl_init($api_url); 
ob_start(); 
$ex = curl_exec($sms); 
ob_end_clean(); 
curl_close($sms); 

return $ex;

Leave a Reply

Your email address will not be published. Required fields are marked *