PHP code example of thungdemo / sms
1. Go to this page and download the library: Download thungdemo/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/ */
thungdemo / sms example snippets
use Thungdemo\Sms\Drivers\Textlocal;
use Thungdemo\Sms\Client;
use Thungdemo\Sms\Message;
$config = [
'apikey' => 'your_api_key',
'sender' => 'SENDER',
];
$driver = new Textlocal($config);
$client = new Client($driver);
$message = new Message();
$message->setMessage('Hello world');
$message->setRecipient('1234567890');
$client->send($message);