09/09/2015

Example for Twilio SMS Send

7


require "twilio-php-master/Services/Twilio.php";

//should be available in your twilio dashboard
$AccountSid = "AC0715xxxxxxxxxxxxxxxxxxxx";
$AuthToken = "4973yyyyyyyyyyyyyyyyyyyyyyy";

$client = new Services_Twilio($AccountSid, $AuthToken);

$message = $client->account->messages->create(array(
"From" => "+123456789", //should be twilio SMS enabled number
"To" => "+9988766555", //valid target number with +
"Body" => "test message",
));

echo "Sent message {$message->sid}";
}

About Author Mr.Bazz

Hi thanks for dropping by. Please share the content if you think there is someone who will appreciate it.

Leave A Comment

Your email address will not be published. Required fields are marked *