How to send SMS to multiple numbers using PHP?

Today text messaging has become an important medium of promotions in the world. A number of web applications are integrated with SMS to notify people about sales, coupons or an event so as to increase the gross revenue of the business. In this page, we will cover how to send text messages with the help PHP library. There are many service provider companies which provide API that can easily integrate with your application which is created by PHP language. With the help of PHP script you can create and import contacts in your application or you can push your database into your application so that it can access your database and send SMS in multiple numbers. To do so you have to connect SMS gateway with minimal configuration.

Process Of Sending SMS to multiple numbers using PHP

*, First of all, compose your message by using the web application and executed it on an HTTP server and then send it through the internet.

The email is received by an SMS Gateway, which transforms the message from an email message to an SMS message.

* After that SMS message is handed to an SMSC server which routes data to particular mobile devices. Every mobile operator deals with the different SMSCs channel so that it is difficult to connect these SMSCs with the application. Therefore SMS gateway is used connect SMSCs with the application which is created by using PHP library.

* Then a message is transmitted over the wireless network to the recipient.

Send Bulk SMS With The Help Of SMS Gateway Provider

SMS Gateway Provider provides API for sending Bulk SMS through a web application. MSG91 is one of the best services provider company which provides SMS gateway in affordable price. Many resellers buy their SMS gateway in wholesale rate and resell it on the high price. MSG91 provides it PHP code to send SMS through a web application. You can use the given source code to set up the configuration of SMS

‘mobiles’ => $mobileNumber,
‘message’ => $message,
‘sender’ => $senderId,
‘route’ => $route
);

//API URL
$url=”http://api.msg91.com/api/sendhttp.php”;

// init the resource
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $postData
//,CURLOPT_FOLLOWLOCATION => true
));

//Ignore SSL certificate verification
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

//get response
$output = curl_exec($ch);

//Print error if any
if(curl_errno($ch))
{
echo ‘error:’ . curl_error($ch);
}

curl_close($ch);

echo $output;
?>

Send Bulk SMS With The Help Of GSM modem

It is quite costly and slow to send the bulk SMS with the help of GSM modem but if you want to use this method then you have to set AT command. This method is costly because a direct connection to a wireless network is very expensive. So it is better to use another method of sending bulk SMS. If you still need help with the PHP issue, drop your query in the comment box we will try to solve it as soon as possible.