####SMS Keywords with Twilio#### The goal of this script is to provide a simple, easy to understand framework for developing an SMS application that uses SMS keywords to navigate.
##Installing##
- Download the zipped file from Github.
- Unzip it and rename it
keywords
. - Download the Twilio PHP Helper Library.
- Unzip the Twilio PHP Helper Library and place the entire folder named
Services
inside thekeywords
folder. - Upload
keywords
to a web server which can run PHP. - Go to the URL of the
keywords.php
file in your browser. Copy that URL. - Buy an SMS enabled Twilio phone number.
- Paste the URL of
keywords.php
in the SMS Request URL for your Twilio number. Don't forget to save. - Send a text message to your number.
##Modifying the Application##
To add a new keyword, add the following to the section labeled ##Controller##:
function keyword(){
/* Any other logic you need to execute goes here. */
$response = new Services_Twilio_Twiml();
$response->sms('The text you want your keyword to show. Under 160 characters');
echo $response;
}
Then add an entry to the section labeled ##Router##:
case 'keyword':
keyword();
break;