1. Go to this page and download the library: Download thilanga/telstra-sms 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/ */
thilanga / telstra-sms example snippets
$bundles = array(
....
//SMS
new ScayTrase\SmsDeliveryBundle\SmsDeliveryBundle(),
new Thilanga\Telstra\SMSBundle\ThilangaTelstraSMSBundle(),
....
);
use Thilanga\Telstra\SMSBundle\Message\TelstraSmsMessage;
/**
* @Route("/testsms", name="testsms")
*/
public function sendSmsAction()
{
$message = new TelstraSmsMessage('0400001111', 'This is a test message.');
$sender = $this->get('sms_delivery.sender');
$result = $sender->send($message);
if (isset($result->messageId)) {
return new Response('Delivery :successful');
} else {
return new Response('Delivery :failed');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.