Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send SMS messages from a server [closed]

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.

like image 760
ragebunny Avatar asked Apr 03 '12 09:04

ragebunny


People also ask

Does sent as SMS via server mean I'm blocked?

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.


3 Answers

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.

like image 149
ro ko Avatar answered Oct 26 '22 04:10

ro ko


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.

like image 28
deceze Avatar answered Oct 26 '22 05:10

deceze


You can use a SMS gateway provider or setup your own gateway.

like image 2
tonymarschall Avatar answered Oct 26 '22 03:10

tonymarschall