开发者

Sending SMS from website to users - how?

开发者 https://www.devze.com 2023-01-30 19:32 出处:网络
I have email notifications on my site but I want to add SMS notifications also. I am lost how to do this. Is it purely coding or do i need to engage in partnerships with phone providers world over or

I have email notifications on my site but I want to add SMS notifications also. I am lost how to do this. Is it purely coding or do i need to engage in partnerships with phone providers world over or buy a service or how does it work. And for the coding are there frameworks i can use or have to do it from ground up? My social network is in php and mysql. Do i need anything from the database for 开发者_如何转开发this, like to store the messages or is that all on the ISP's end?


You need either a service for that, or to set up your own infrastructure (GSM modem, etc.). Best go with an SMS Aggregator, such as Clickatel. The technical term for this kind of service is "SMS Gateway".

Whichever gateway you choose, you need to find out what their API is and use it to send SMS.


I recommend Twilio. I used them to send SMS and synthesized voice notifications for an agricultural telemetry monitoring application I developed, and in my experience they have a fantastic service at a very reasonable price. (If I sound like a shill, I'm not -- just a happy customer.)

As for integration, they have a REST-based API that's easily used from PHP. I think they even have a PHP library, although I haven't used it myself.


You need to sign up to a SMS gateway. There are very many SMS gateway providers out there. You need to write code to send the SMS, quite similar to the code you write for sending e-mails. Fortunately you can re-use code written by others for this.

I have good experience using Clickatell as SMS gateway and they have code for sending sms ready for several languages including php. You do not need to store anything in your database, fire and forget.

Good luck :)


Many telephone companies also operate free email-to-SMS gateways; for example, T-Mobile has it setup where you can send to phonenumber@tmomail.net to send an SMS/MMS message. Of course, it is less efficient and also requires that you know about all the gateways out there (and keep them up-to-date as possible, of course). However, it's an option if you have only a small number of users, and/or a large number of users that are on a small number of separate networks.


You have two main options when it comes to adding SMS functionality t your website or blog. 1. Cloud based SMS gateways 2. Software based SMS gateways

Informs of initial setup Costs and time required to set up the service, cloud based solutions are preferable as their popularity means there are many who use the service and provide hell on their forums - normally only a little knowledge of html you could be up and runing within a few hours

The following website has some useful info on the subject and also provides a free international SMS widget for webmasters to add SMS to their websites or blogs

http://xboxpcpro.co.uk/how-to-add-sms-to-website/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号