Example for Twilio SMS Send


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}";
}

Leave a Reply