Twilio SMS PHP Sample
Learn how to send SMS message with Twilio PHP SDK
Twilio is one of the fastest growing telecommunications company. Just last month they launched their IPO. As time passes twilio is bring new features for developers that are being used all around the world.
Today i am going to intruced on of their simplest feature which is SMS Messaging.
In order to do SMS message with Twilio you will need to register with them and download their PHP SDK: Here
Note: Please make sure to verify your phone number for the test trial. You will not be able to send SMS with the test trial to phone numbers that are not verified in your account.
Send SMS PHP Source:
<?php // this line loads the library require('/path/to/twilio-php/Services/Twilio.php'); $account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; $auth_token = '[AuthToken]'; $client = new Services_Twilio($account_sid, $auth_token); $client->account->messages->create(array( 'To' => "+15558675309", 'From' => "+15017250604", 'Body' => "Hey Jenny! Good luck on the bar exam!", ?>