-2

I have a link that works directly from browser that is the sms gateway we are using. I am trying to make to send sms to multiple numbers using php and mysql as database please help me with full code.

  • Have you googled the same question, there are alrady multiple posts that you can find. – Rahul Dec 27 '16 at 06:46
  • Your question is too broad and you can use [curl](http://php.net/manual/en/book.curl.php) for this! – Abhishek Gurjar Dec 27 '16 at 06:46
  • You will need sms gateway which provide `REST Api` to send sms using php. – DD77 Dec 27 '16 at 09:04
  • My link is following. Kindly help me for the full code. http://sms.indiabulksms.in/app/smsapi/index.php?key=987654321&campaign=0&routeid=8&type=text&contacts=999999999&senderid=smsing&msg=hello – Prof. H N Vazirani Dec 27 '16 at 10:55

2 Answers2

0

1.get all mobile numbers in array 2.fetch and run feach loop 3.put that senting code. ex:

$data = array('9940272758','213456789','8973557140');
foreach($data as $value){
  sendapi($value,"hi","somthing");
}
  • My link is following. Kindly help me for the full code. http://sms.indiabulksms.in/app/smsapi/index.php?key=987654321&campaign=0&routeid=8&type=text&contacts=999999999&senderid=smsing&msg=hello – Prof. H N Vazirani Dec 27 '16 at 10:54
  • Thanks for your suggestion. I am getting following error while using your suggested code. – Prof. H N Vazirani Dec 28 '16 at 08:24
0

$result=$array(); //Get from database here assume it is $result

foreach($result as $mbl){
  sendapi($mbl['phone'],$mbl['message']);
}
Fabio
  • 23,183
  • 12
  • 55
  • 64
  • My link is following. Kindly help me for the full code. http://sms.indiabulksms.in/app/smsapi/index.php?key=987654321&campaign=0&routeid=8&type=text&contacts=999999999&senderid=smsing&msg=hello – Prof. H N Vazirani Dec 27 '16 at 10:41
  • Thanks for your suggestion. I am getting following error while using your suggested code – Prof. H N Vazirani Dec 28 '16 at 08:24