tags:

views:

153

answers:

4

Hi

I currently have a php script that reads email messages sent from phones and then it posts them on the internet...

I want to do the same thing but instead of reading emails, I would like to process the data through a SMS.

so, if someone sends a sms to X number, my program would get the message through this X number and use it in the site.

What would I need?

+6  A: 

You have a lot of options here. Generally speaking you need to first acquire the number that people can SMS to. Afterwards a callback will be issued to you when someone sends and SMS and your PHP script can process the message and figure out what to do with it.

You essentially have a few options for exposing the SMS

  1. Go with a dedicated short-code. Eg someone sends a text to 53234 and you will get a callback to deal with it. This is an expensive option. It will cost you generally around $2500/mo minimum not including per messaging fees. You can requisition a short code through a provider such as Open Market. You have to get approval for the short code which might take as much as 6 weeks.

  2. Go with a shared short code. This is a bit cheaper -- you pay per message and it usually costs anywhere from .02 - .10 /msg depending on your msg volume. You get a keyword such as DOLLY that people have to preface before texting. So they would text DOLLY INPUT TEXT HERE to 53234 now and you would receive the callback with INPUT TEXT HERE. Celltrust and others provide shared short codes.

  3. Use a public api that allows people to text in through something such as TextMarks. Textmarks is like a shared short code requires keyword usage + users to subscribe. However it is free which is great and has a nice callback API. I believe a service called Mozes also provides similar service. Finally, if you want you can set up a Twitter account and have people text to their number. Facebook also a similar API that allows you to use their FBOOK shortcode.

Ish
A: 

Ish's answer was great. I'd like to point out an additional free option.

Most carriers allow you to send SMS messages to email addresses. The SMS text gets inserted into the body of the email and the subject is carrier dependent. Once the email is sitting in your inbox, you can access it by the method of your choice.

This method has worked for me in a personal project requiring remote communication with my computer when all I had was a cell phone without internet capabilities.

This Wikipedia page shows how many carries support this (practically all).

Just try not to violate anyone's terms of service, you could always host the email account yourself.

colithium
+2  A: 

Check out publisher section on udefn.com. udefn provides free sms api, which you can easily integrate into your application. It allows for polling for messages (so you don't have host the application), or you can setup postback to receive incoming messages. There are code samples available to get you started.

You code your applications as bots and share it with set of users or with everyone. And its free to create and publish bots. For mobile users, there is no cost either (other than their standard rates with their service provider). Users simply add your application/bot to their profile, define a keyword and start using it.

The idea behind udefn is that users define their keyword (increasing the probability of them remembering it and using it). And for bot publishers, its a zero cost way to sms'ise their application. udefn has a dedicated shortcode 51406 (in US for now and international support will be added soon)

A: 

You could use an sms application like ours on a shared short code with a forward to http url function. When someone texts to the short code, the info forwarded to an http url you provide to be parsed and done with what you please. Lear more at SMS Gateway

SMS Reseller