##Overview## Quickstart Twilio/SMS/PHP/AJAX is a plugin that lets you send SMS message via the Twilio REST API with PHP and AJAX.
With Twilio you can programatically send, receive an track SMS worldwide, by building intelligent SMS logic into your web applications over local, toll-free, and short-code numbers globally from one API. Read more about Twilio SMS
##Requirements## Twilio Account
Webserver running PHP 5.2.3 or later
###Recommendations### While it's not required, we recommend that you use Google Chrome during development for logging variables, with ChromePhp, to the console.
##Installation## Thees instructions presume that you have Google Chrome installed to your system and that you already have a Webserver with PHP set up.
###Automatic### ####Step 1: Chrome Logger####
- Install the Chrome Logger extension for Google Chrome from: https://chrome.google.com/extensions/detail/noaneddfkdjfnfdakjjmocngnfkfehhd
- Click the extension icon in the browser to enable it for the current tab's domain
####Step 2: Twilio-SMS-PHP-AJAX-Quickstart#### You can install Twilio-SMS-PHP-AJAX-Quickstart via Git or by downloading the source. #####Via Git:##### Open a command line and use this command to clone the Twilio-SMS-PHP-AJAX-Quickstart:
$ git clone https://github.com/iamchriswick/Twilio-SMS-PHP-AJAX-Quickstart.git
#####Via ZIP file:##### Click here to download the source (.zip) which includes all dependencies.
Once you've download the library, go to Step 5!
###Manual### ####Step 1: Chrome Logger####
- Install the Chrome Logger extension for Google Chrome from: https://chrome.google.com/extensions/detail/noaneddfkdjfnfdakjjmocngnfkfehhd
- Click the extension icon in the browser to enable it for the current tab's domain
####Step 2: Twilio-SMS-PHP-AJAX-Quickstart#### You can install Twilio-SMS-PHP-AJAX-Quickstart via Git or by downloading the source. #####Via Git:##### Open a command line and use this command to clone the Twilio-SMS-PHP-AJAX-Quickstart:
$ git clone https://github.com/iamchriswick/Twilio-SMS-PHP-AJAX-Quickstart.git
#####Via ZIP file:##### Click here to download the source (.zip) which includes all dependencies.
####Step 3: ChromePhp#### 3.1: You can install ChromePhp via Git or by downloading the source. #####Via Git:##### Open a command line, navigate to your project directory and use this command to create a ChromePhp directory:
$ mkdir ChromePhp
Navigate to your ChromePhp directory and use this command to clone the ChromePhp:
$ git clone https://github.com/ccampbell/chromephp.git
#####Via ZIP file:##### Click here to download the source (.zip).
Put ChromePhp.php somewhere in your project directory.
3.2:
Include ChromePhp.php in twilio-sms.php:
include '/path/to/ChromePhp.php';
####Step 4: twilio-php#### 4.1: You can install twilio-php via Git or by downloading the source. #####Via Git:##### Open a command line, navigate to your project directory and use this command to clone the twilio-php library:
$ git clone https://github.com/twilio/twilio-php.git
#####Via ZIP file:##### Click here to download the source (.zip) which includes all dependencies.
Once you download the library, move the twilio-php folder to your project directory.
4.2: Include the library file in twilio-sms.php:
require '/path/to/twilio-php/Services/Twilio.php';
####Step 5: Twilio Settings#### 5.1: Go to your Twilio Dashboard and find your ACCOUNT SID and AUTH TOKEN.
Open send-sms.php and enter your ACCOUNT SID and AUTH TOKEN.
$AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$AuthToken = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY";
5.2: If your Twilio account was created before July 13, 2012, it is using a shared “Sandbox” number while in trial mode. If you want a unique phone number for your account, which you can keep even after you upgrade, get one here. Twilio encourage you to do this, since using the shared Sandbox number has several restrictions that don’t apply to user Twilio phone numbers normally.
Open send-sms.php and enter your Twilio number.
$twilioFromNumber = "YYY-YYY-YYYY";
and you're good to go!
##Reporting Issues##
We would love to hear your feedback. Report issues using the Github Issue Tracker.