This is a simple example of how you can use Twilio to add SMS functionality to a web form.
In order to use this code you will need:
- A web sever capable of running PHP
- An FTP client, or some other way to deploy code
- An upgraded Twilio account
- An SMS enabled phone number which you have purchased from Twilio
You will need to follow these steps:
- Download and unzip this code
- Rename the folder
form_to_sms
for now. You can rename it again later, it just makes it easer to explain what we are going to do next. - Download and unzip Twilio PHP Helper Library
- Move the
Services
folder from the Twilio PHP folder you just unzipped into theform_to_sms
folder - Open
form_to_sms.php
and replace the dummy Account SID, Auth Token and Sending Number with values relevant to your Twilio Account. - Upload the entire
form_to_sms
folder to your web server, and visit the URL ofindex.html