Receive SMS messages in a web application in the US on a hosted server

懵懂的女人 提交于 2019-11-29 01:47:21

You might look into http://www.twilio.com/sms/ it's very reasonable pricing and the implementation is really very easy. You should be able to get something setup in a fairly short amount of time.

This is bad form... answering my own question, but I've just stumbled upon a possible simple (and FREE!) option.

You can sign up for Google Voice, using an email address of your own choosing. This gives you a phone number for users to send messages to. Then, through the settings, you can have any text messages sent to that number forwarded to the email address you've chosen. With a little PHP, you can read the phone number of the user who sent the text message, and the body of their message.

So far, this seems to work just fine. Not sure if it complies with GVoice's terms of service, but since my app is small and free, hopefully no one will notice.

I don't know how much volume you can run through this method, or if I'll run into other limitations.

Still interested in hearing about other and better solutions.

I can see how you might have some problems physically connecting that cheap phone to your hosted server. But why would you need a physical connection nowadays? A slightly more expensive phone could receive the SMS, wrap it in a HTTP body and POST it to your webserver. You might even do some rudimentary filtering (e.g. whitelist/blacklist). All data traffic would be over the air, which - at the volumes mentioned - would still be affordable.

Here's another option:

Get your hands on a cheap Android device with GSM connectivity and install one of the many SMS Gateway apps in the Google Market.

For example, SMS Gateway says to support these features:

This application turns your android phone into powerful SMS gateway.

Features:

  1. Periodically checks for e-mails via POP3 and send them via SMS.
  2. Send SMS by HTTP GET request on its internal webserver.
  3. Forward received SMS to desired e-mail via SMTP.
  4. Forward received SMS by calling remote webserver via HTTP GET.

So you can forward incoming SMS to an email address or a web application (or web service or web API) and also you can SEND SMS via a HTTP GET request to its very own internal webserver.

Pretty neat, I'd say. And I'm sure there are others with similar or better features, still.

I am not affiliated to SMS Gateway (or any other sms gateway app on the Google Market).

EDIT: Forgot to mention... It's free!

Take a look at OptIt. They work well for small-time SMS operations. They do dedicated shortcodes (expensive) as well shared shortcodes (for $20/month/keyword and $0.02/message). Their website is quite useful and has a lot of functionality (subscriptions, autoresponses, subkeywords). In addition, they offer an API so that you can have custom behavior.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!