mtk
mtk

Reputation: 13709

Send and receive SMSes in PHP

I have two questions.

  1. I want to send SMSes from a web-site in PHP to the user giving information about his orders. I need an SMS to be displayed as 'TD-COMPANY-NAME' as we normally get it from some big e-commerce web-sites. How do I achieve this? Any pointers how this is done? I am just going round and round on googling.

  2. Also, there are several other operators who will be sending SMSes to the application in a specific format which will get parsed and respective updates will be done in the database. How do I achieve this?

Note: This application is designed to work in India locally. And the backend is PHP and MySQL.

Upvotes: 5

Views: 8720

Answers (5)

astef
astef

Reputation: 9478

What you referred as TD-COMPANY-NAME is usually called as SenderId, or Source. We support it in all our API calls.

For example, this request:

curl -X "POST" https://api.wavecell.com/sms/v1/amazing_hq/single \
    -u amazing:1234512345 \
    -H "Content-Type: application/json" \
    -d $'{ "source": "AmazingDev", "destination": "+6512345678", "text": "Hello, World!" }'

Results in: SMS with custom SenderId

Regarding second part of your question, I see no problem in using multiple different Sources until all of them are non-offensive and authentic (do not try to mimic other brand names).

Upvotes: 0

Jason McCreary
Jason McCreary

Reputation: 72961

Send and receive SMSes in PHP

Check out Nexmo and Twilio.

I've used both. I think Twilio has a shallower learning curve. But Nexmo offers free incoming messages. So depending on your application, that could play a huge factor (for example, an SMS voting system).

Both have excellent documentation and PHP code samples.

Upvotes: 8

PinoyStackOverflower
PinoyStackOverflower

Reputation: 5302

How bout trying FrontlineSMS, this is also a great tool and it's not exclusive for a few countries, meaning to say, it supports all countries. It also has a good documentation as well and a good support in PHP POST AND GET methods.

Here's the link: http://www.frontlinesms.com/

Upvotes: 1

Nitin Gupta
Nitin Gupta

Reputation: 202

You can write your own PHP code to send and receive SMS through serial port GSM modems. It will be far better as compared to use SMS gateways or Twilio like solution. In that case you are totally dependent on them as in case their service gets interrupted , your business will also gets effected without any reason.

Upvotes: 0

fvu
fvu

Reputation: 32953

If you're looking for a solution built around a server that sends and receives SMS with your own infrastructure (that's by using GSM modems) you really should have a look at SMS Server Tools. It interacts with your application via spool directories (basically you write a formatted text file you want to be sent out in a specific directory and the application takes care of the rest), it's simple to setup and quite reliable.

Upvotes: 1

Related Questions