I want to send SMS messages to multiple numbers in my database based on an event happening. I was wondering if there is a way of doing this in PHP or Javascript? Maybe there is a function like php's mail function?
If not does anyone know of any good and easy to implement systems paid or free?
I'd like to have a go at developing something like this myself, but have a feeling that it might take me a long time.
Any other information or tips on the subject would be greatly appreciated.
Thanks for the time.
Oh, also I'm using Ubuntu server if that helps.
Some people also start to fear that sent as sms via server means i'm blocked out from my phone. But this is not true.
There is no function in PHP or javascript that can send sms directly. SMS are basically based on Short Message Peer-to-Peer (SMPP) protocol so there is no way you can directly send sms programmatically. Yes you could use smsgateway or an existing api where you can make a http request from php. There are lot of sms service providers like VAS providers and there are lot of free and open source smsgateway like kannel which you can use to send/recieve sms or if you could configure your own gateway as well.
You typically use an SMS gateway to do this. There are many out there, google. Those offer an API of some sort (REST, SOAP, whatever) that you can make a request to. The gateway service will then send out the SMS message over the phone network. These services are typically paid for.
For very limited scenarios that only need to support certain carriers, you can often get away with sending a regular email to a special address, like [phonenumber]@carrier.com
. Not all carriers support this though.
You can use a SMS gateway provider or setup your own gateway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With