Introduction
SMS (also known as text-messaging) has grown into a very popular method of communication. It has been around in Europe and Asia since the early nineties and its use is steadily increasing in the US as well.
SMS stands for "Short Message Service" and uses mobile phones to transmit (surprise, surprise) short messages to and from mobile phones and whilst many of us might not know this, it is also possible to send SMS messages from a website or a piece of software.
There are an infinite number of reasons why you might want to use your website to send SMS. You might want to add a "send by SMS" option to your headlines, for example, or you might want to provide 24/7 support in which your technician is alerted by SMS or you might simply want to provide your viewers with Free SMS to drive traffic to your site.
Although it is also possible to send SMS via e-mail, this tutorial will teach you how to send SMS using GET and POST HTTP methods in PHP (since it’s the language I know).








May 14th, 2005 at 1:03 pm
Hey Farheen, this is a great tutorial, thanks for submitting it
May 14th, 2005 at 1:12 pm
No problem!
May 16th, 2005 at 10:25 pm
I will like to know how to send SMS using get and post ( sending the SMS as an email), so I will have a drop down menu where the user will choose from a list of cellphone carrier ( like pacific bell, T-mobile, etc,etc )and the user will only enter the number wich then it will replace the #### on the ####@pacbellpcs.net (if they choose Pacific Bell) or any other carrier from the drop down menu. Plus a user name to fill in ( Subjet) and then a small message to fill in.
I can send it using my email program, but I will like to to have it in a webpage.
Any idea on how to do it using a form?.
I will apreciate your help.
Thanks
May 18th, 2005 at 2:02 pm
hi there
we’re a mobile messaging solution provider and i think our gateway will work in almost an identical manner to this. We also offer backup gateways for redundancy.
Also, we have some more code samples that may be of interest.
Have a look at :
http://aql.com/site/developerinfo2.php
and
http://aql.com/downloads/software/ssss-v1.01.tar.gz
this isn’t meant to be a blatant sales pitch, but more an offer of help to anyone who is having fun trying to connect to sms gateways….
May 18th, 2005 at 4:14 pm
No doubt. This tutorial can be applied to almost any gateway that provides support for http. Anyone who wants to use it should compare gateways and choose the one that suits them most.
Thanks for the comment. I’m glad you like the tutorial.
May 18th, 2005 at 4:31 pm
salam
May 30th, 2005 at 10:17 pm
it was realy good and also helpful.
June 1st, 2005 at 8:47 am
PHP Kitchen have published recently an article about Sending SMS Thru HTTP. I guess there is many others articles and APIs also, bu
June 27th, 2005 at 10:53 am
Hi
Couple of questions on your script above.
1. Are there any security issues? i.e. with automated bots using your gateway to send out spam text.
2. Do you know of any tutorials or scripts that do the same in reverse and accept sms into a mysql db for displaying on a web page?
Cheers
Lettie
July 4th, 2005 at 1:22 am
This is awesome. I went to both sms service providers and found both to be comparable.
I may just work this into an sms sending class and implement list sending for some band websites I am working on. thanks.
July 4th, 2005 at 5:41 pm
Hi, that was a great tutorial…but can u tell me how and where i would modify it to make it work for o2 free sms??
the password is shown in the url, thats a big security risk isnt it? might be better to use post.
July 25th, 2005 at 12:21 pm
Hey Farheen, thank you so much for this tutorial. I have now signed up with TM4B they are awesome.
After spending ages trying to do a ’silent’ HTTP POST (still can’t believe this is not supported by PHP natively) I had almost given up home. You have save me hours.
Cheers
Ray.
October 12th, 2005 at 8:09 pm
Thanks for the help. We are using it to send HTTP POST to Kapow! (http://www.kapow.co.uk/) and are VERY happy with it so far!
November 3rd, 2005 at 3:13 pm
Using SMS in a Box at http://frameworx.dk/smsinabox
Also supports TM4B and also Clickatell so you can switch between the two. Regular modem can also be used with the same interface as used to connect to the HTTP SMS providers.
November 24th, 2005 at 6:51 am
Hi, that was a great tutorial…but can u tell me how and where i would modify it to make it work for o2 free sms??
December 16th, 2005 at 4:44 am
Thank you very much Farheen for this tutorial, and I have three questions :
1- what is the difference between GET, POST
2- This example uses GET. if we want use POST, what we shuold to do .
3- Is this PHP Code is the use directly with our website without any changes
March 22nd, 2006 at 6:18 am
Hello Asiri,
for more info about the difference between GET and POST there is a nice article at
http://sgcet.blogspot.com/2006/02/should-i-get-or-should-i-post.html
ocptime
July 1st, 2006 at 5:26 pm
Hey man this tute was cool.
Hey i just got a question.Can we receive sms as emails to our system by using this gateway ? If can then what is the method ?
Please reply with a solution to email address and i appreciate your help very much.
Thankx
May 3rd, 2007 at 3:53 am
hi
iam a web developer from nepal ia eant to start a web as your
please tell me wether i need a sim or not to implement that code
November 6th, 2007 at 9:07 am
Hi,
I raelly apprecita this article. Honestly i want to biuld an application that will be sending sms, but i dont really understand the concept of tm4b and how i can register with them to enable me have a user name and password as fast as possible. And also i want to know if i can use effeciently in my country i.e Nigeria. Thanks and God bless
January 14th, 2008 at 9:43 am
goooooooooood
February 3rd, 2008 at 9:21 pm
This may be useful to some of you. There is a tutorial at
http://www.easykiss123.com/?p=32
It is a video tutorial and a free script for putting an sms enabled contact form in your site. The form sends you an email and an sms alert letting you know a user has filled out the form.
February 23rd, 2008 at 7:06 pm
I still am not able to configure..out of the three program you have mention above which one i need to use… cn u plese tell me the flow in steps starting from the html form
I want to use this sytem for an mobile alert for this website http://www.carpoolglobal.com