views:

630

answers:

6

I want to design a website that can send and receive sms.

  1. How should I approach the problem ?
  2. What are the resources available ?
  3. I know php,python what else do I need or are the better options available?
  4. How can experiment using my pc only?[somthing like localhost]
  5. What are some good hosting services for this? [edit this]
  6. [Add more questions you can think of?]
A: 

You need a SMS server. This should get you started.

dirkgently
+3  A: 

You can take a look at Kannel. It's so simple to create SMS services using it. Just define a keyword, then put in the URL to which the incoming SMS request will be routed (you'll get the info such as mobile number and SMS text in query string parameters), then whatever output your web script generates (you can use any web scripting/language/platform) will be sent back to the sender.

It's simple to test. You can use your own PC and just use the fakesmsc "SMS center" and just send it HTTP requests. If you have a GSM modem you can use that too, utilising the modem's AT command set.

cruizer
But how are real messages sent? Do you just connect a mobile phone or GSM modem? Sending messages overseas that way would be very expensive.
Adrian Grigore
You will have to work out a deal with a telecoms company in your country. They will provide you with a full-time connection (via leased line, or even via Internet) that you can use for your actual service. Most likely Kannel will still support that full-time connection ;)
cruizer
+2  A: 

First thing, You need to sign up for an account (SMS gateway), most of them also give you example code how to send and receive sms using their API. Then you will wrap the the sms functionality around your sites logic.

e.g http://www.clickatell.com/developers/php.php

Ronald Conco
A: 

Since my company does this sometimes (text promotions etc, though our main focus is much much lower level stuff), I figured I should pitch in.

By far the simplest way is to use a service such as Clickatell, which provides a HTTP API, as well as FTP and SMPP amongst others. I don't know how Clickatell deals with receiving messages, however, as we use direct SMPP binds to our local mobile operators for this.

If you are willing to pay for it, you should be able to get an SMPP bind to your local mobile operator, but its often expensive. This would also allow you to purchase your own shortcode.

You may also want to give mBlox or Nextcell a look. A quick Google search will turn up more.

you could also buy a GSM modem, which would allow you to send and receive messages as you normally would with a phone, except through a PC. This usually means you will pay whatever you would with a phone. (In Ireland anyway)

Dan
+2  A: 

I've copied this from an answer I gave in relation to this question. However, in addition to the text below, take a look at Wadja's SMS Gateway deals (API link)... they appear to be a really good option at the moment, though I've not used them, personally.

Your main option for sending SMS messages is using an existing SMS provider. In my experience (which is extensive with SMS messaging web applications), you will often find that negotiating with different providers is the best way to get the best deal for your application.

Different providers often offer different services, and different features. My favourite provider, and indeed, the one that has happily negotiated with me for lower rates in the past, is TM4B (http://www.tm4b.com). These guys have excellent rates, cover a huge proportion of the globe, and have excellent customer service.

Below is some code extracted (and some parts obfuscated) from one of my live web applications, for sending a simple message via their API:

require_once("tm4b.lib.php");
$smsEngine = new tm4b();

// Prepare the array for sending
$smsRequest["username"] = "YOURUNAME";
$smsRequest["password"] = "YOURPWORD";
$smsRequest["to"] = "+441234554443";
$smsRequest["from"] = "ME!";
$smsRequest["msg"] = "Hello, test message!";

// Do the actual sending
$smsResult = $smsEngine->ClientAPI($smsRequest);

// Check the result
if( $smsResult['status'] == "ok" ) {
    print "Message sent!";
} else {
    print "Message not sent.";
}

Many other providers that I've used in the past, have very similar interfaces, and all are really competitive when it comes to pricing. You simply have to look around for a provider that suits your needs.

In regard to cost, you're looking at prices ranging from a few pence/cents for most Western countries (prices are a little bit higher for most third-world countries, though, so beware). Most providers you will have to pay in bulk, if you want decent rates from them, but they'll often negotiate with you for 'smaller-than-usual' batches. Most providers do offer a post-pay option, but only when you've successfully completed a few transactions with them... others offer it from the start, but the prices are extortionate.

Hope it helps!

James Burgess
+1  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)