SMS, which is abbreviation of Short Message service, is the most commonly used feature of a mobile phone after the phone call. Although it’s limited to 160 characters, sending an sms text is very popular in several cases like;
- A phone call is not possible
- A phone call will cost more than sending an sms message
- It’s more fun to send sms text rather than talking at that time.
There are just a few samples for individuals use sms text to communicate.
But if you own a web site, adding an sms service to your site, can be cool, and cutting edge. Also adds another form of communication with your customers, and your web site.
Some of the examples of sms service at your web site can be listed, but not limited to:
- Customer Verification with SMS message
- Notification of special events/products/discounts via SMS text
- Notification to your self about some cases at your web site
- SMS Text Marketing of your opt-in lists (You cannot just send sms to any number without a prior approval)
There are several sms service providers in Internet world. But at OnVerify.com, we provide the easiest solution with standard features, at a competitive price. You don’t need to write long sms software to send sms text from your web site.
Firstly you need to open a free account at OnVerify.com. It’s free, gives you $0.25 credit when you complete Phone Verification process automatically. Then get your userid and apipass from documentation or profile page, and paste the code below in your favorite php editor:
$f = file(“http://www.onverify.com/sms.php?userid=youruserid&apipass=apipass&msg=test&number=number”);
That single line of code will initiate a sms text sending from your web site easily. Let me explain the parameters:
userid=youruserid, this is the userid you get from onverify.com, we need to recognize you
apipass=yourapipass, this is the api password you get from onverify.com to authenticate you
msg=test, this is the text message we will send to the mobile number. remember to urlencode your message before feeding it to here.
number=number, this is the number we will send sms text message to. It must be in international numbering format; country code + area code + number (like 18581234567)
On return, you’ll have a single line. Which is a numeric code, that you may want to check.
echo “username or password is wrong”;
echo “balance is not enough”;
echo “number wrong”;
echo “ip restriction”;
echo “dublicate vid”;
if ($f>100) echo “sms is queued”;
Let me explain. At first step we send to request to OnVerify.com’s sms service. We get a numeric code from that page, which can be 2,3,4,6,7 or >100. each meaning something.
2: username or apipass is wrong. please re check and compare them with OnVerify.com
3: balance is not enough. OnVerify.com works from positive balance. But don’t worry during the tests and integrations. Just drop us an e-mail to email@example.com. Ask for more credits, and explain your project. We are more than happy to help
4. number wrong. Yes it must be in international format. Which is country code + area code + number
6. restricted ip. You can limit the server’s ip that the calls with be initiated from
7. dublicate vid. This is used for callback firing. At the end of sms sending we fire a callback to your system explaning the status of the sms. (sent, unsent, cost, etc)
Sending a SMS text is asynchronous at onverify.com. Which means, when you initiate a sms sending, OnVerify.com will return you immediately if this call is accepted or not. Later, it will notify you with sending a request to the callback url that you set at sms text message initiation step.
In this article, I tried to show how easy it’s to send sms text message to any phone using OnVerify.com’s services. In order to send sms text, you dont need to setup/develop big sms software, just use the sms service feature of OnVerify.com