1. Go to this page and download the library: Download unimodern/yii2-twilio library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$twilioService = Yii::$app->Yii2Twilio->initTwilio();
try {
$message = $twilioService->account->messages->create(array(
"From" => "+12345678901", // From a valid Twilio number
"To" => "+12345678901", // Text this number
"Body" => "Hello from my Yii2 Application!",
));
} catch (\Services_Twilio_RestException $e) {
echo $e->getMessage();
}
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.