FrontlineSMS let users send, receive and manage SMS over a mobile network.

Create Awesome SMS APP with External Command.(Tutorial PART 1)



Hi Friends!

Some time ago I was looking for resources for 'How can we build an app with FrontlineSMS external command?'. I learned it from many different websites and Frontline team also helped me a lot. Now I want to share my learning with you!

I assume you are familiar with PHP and also have a local server ( because remote host would show slow response while testing the app. once you have made it then you may change to remote server to implement it to you website :-) ). The local server I use is XAMPP by it's open source and (if you haven't already) you can download and install on your computer easily, just check "Install Apache as service" during installation.After installation is complete point your browser to http://localhost to confirm installation of server, If it shows language selection screen with XAMPP logo, voila !! you've installed Apache as your server.

Now when you've installed we are ready to start the "Amazing SMS App" :-)

Go to C:\xampp\htdocs and create a new folder named "SMS" (or whatever you like I would use it for ease) it would be accessible by browser at http://localhost/sms create a file index.php in sms folder , Now rest of the work we'll perform through editing this file and command setting of FrontlineSMS.

Start frontlinesms and create a keyword 'APP'. (I've come to know that keywords are case sensitive so be sure while creating and using them any where because  for instance, using APP and App would show totally different results.)

Now for keyword 'APP' go to External Command -> HTTP response.

and enter the following Command:


and check The "Auto reply" box.

Now what would this command do? Well ,It will be forwording all the SMSs with keyword APP to our index.php file with sender number and sender's message and we'll leave the rest for PHP and MySQL to handle. :-)

ohh guys I didn't realize that how time ran during talking to you. It's time for dinner and my Mom is calling me before she comes with a stick :-( in hand,  Please let me go. :-)

As everybody is always a learner, So am I. Please correct me where I'm wrong and do post comments.

See you tomorrow with next part of our Amazing app tutorial. Bye.

Views: 1652


You need to be a member of FrontlineSMS to add comments!

Join FrontlineSMS

Comment by stanley mbewe on April 16, 2015 at 10:44am

Hi Moin

Am using ubuntu and i was trying this tutorial to save the contents of an sms to a database. When i send the text with the created keyword(take) nothing happens but the HTTP Request on the keyword shows a hit.

then i added a port number in the keyword like this:


then i sent a message (take 5).  on the http trigger screen i get this error:

No handler found for request: sms/index.php?sender_number=%2B26588.....&message_content=5

what am i doing wrong?

Kind regards


Comment by Moin Uddin on October 20, 2011 at 7:04am

Hi Juan!

you don't have to go for complex things. just go to ''External Command -> HTTP response'' and enter the URL where your php script is located.

E.G; http://localhost/sms/index.php?num=${sender_number}&msg=${message_content}


and check the auto reply box.


I'm available for any further help, just let me know.

Comment by Juan Salvador Peñalver on October 19, 2011 at 7:53am
Moin Hello! Yes, I have installed XAMPP, even works well on localhost, open phpmyadmin, everything works, butwhen I set the FrontlineSMS and select the Setup menu, Configuration database, select the third option (mysql.database.xml) I accept and asks me to restart immediately FrontlineSMS. Restart the software and then I can only boot screen FrontlineSMS and if you are desaparece.Ya I click and I have checked the user, the localhost address, the local key server fine, but I see no database created "FrontlineSMS" in phpmyadmin. I create it manually? How do I do? what may be happening? I modify the xml file? I appreciate your help!
Comment by Moin Uddin on October 19, 2011 at 3:58am

Hi Juan!

Have you installed the XAMPP?

And where is the problem, in PHP or in starting the Frontline SMS?

Please explain.

Comment by Juan Salvador Peñalver on October 17, 2011 at 8:08am
Hello! your explanation interesting, however I fail to do anything the index.php must be software configured to work with MYSQL database? how to set it up?, placed in FrontlineSMS option MySql database and start the software does not do anything, just the login screen appears and then disappears. have any idea how to fix this? in fact looking at phpmyadmin database and the database appears that says the FrontlineSMS. I create it? How do I do?!?! thank you!
Comment by Florence Scialom on August 11, 2011 at 6:38am

Hi Moin,


Thanks so much for sharing the FrontlineSMS knowledge you have picked up with other users here! It is really helpful to share lessons learned here on the community, so appreciate the input! \o/




Comment by Moin Uddin on August 11, 2011 at 6:16am

Hey ssembajjwe !

Just keep reading the blog posts and you will come to know everything or at least what you are asking.

It's quite easy and I'll show you in my upcoming posts...

Comment by ssembajjwe geoffrey on August 11, 2011 at 2:08am
quite awesome buddy.Frontlinesms normally comes with inbuilt sqlite database.How can i by pass this to mysql server database.i want to design an application which can query mysql database and be able to send responses to the particular number.

© 2017   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service