Incoming SMS API for PHP

We receive lot of inquiries from our users asking about how to receive incoming SMS to their application. I think our developers are expecting it to be very complicated than it is. We have made our incoming sms api extremely simple and user friendly.
Actually all you are doing is setting up a web page to which we send the incoming data to through an HTTP GET. Whatever your web page displays, is sent back to the phone.
In order to give our developers an open hand, we have also given an option to setup their web page URL on which they want to receive their incoming data.  (Add/Edit keywords in control panel)
Here is a sample PHP script which you can put to your webpage.
$smssender = $_GET[“who”];
$incomingMessage = $_GET[“what”];
echo(“The sender is $smssender, the message is $incomingMessage .”);
// Here you can also echo a dynamic auto reply based on incoming message and sender.
It doesn’t get simpler than that! Create a page with this in it on your web site called smshandler.php.
Go into our control panel an put the full URL in the URL Post box.
When an incoming message to your keyword comes in, it will be sent to your URL as follows (with the real values) –
The variables we send to you on the query string are:

  • who – phone # of the incoming sms
  • what – the complete message

It really is that simple. In your script, you do whatever you need to do to create the return message, and simply echo it back to the browser.
If you call the script in your browser with the query string, you should see the message returned.
Make sure there is NO HTML at all in the response.
Thats it! Now don’t wait ..  just create an account for ShortCode or Long code and have a THREE days of FREE Trial on your favourite keyword .
Team SMSLane


Share on facebook
Share on twitter
Share on pinterest
Share on linkedin

Leave a Reply

Social Media

Most Popular

Get The Latest Updates

Subscribe To Our Weekly Newsletter

No spam, notifications only about new products, updates.


On Key

Related Posts

Top 10 Benefits of Promotional SMS

1. Build Loyal Customers SMS Marketing is a great channel to engage and build loyal customers. Offer your customers promotions and offer information about your

10 Ways for SMS Marketing that works

In modern day, companies are looking for effective. Two factor SMS authentication also know as 2F auth, provides an additional layer of security.  OTP SMS makes

When customer is Angry

At some moments customer service job can be a challenge. Dealing with different people and trying to meet their expectations is not an easy task.

New launch | Convert visitor into customer on your website
This is default text for notification bar