PHP code example of lapshev / sms-assistent

1. Go to this page and download the library: Download lapshev/sms-assistent 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/ */

    

lapshev / sms-assistent example snippets


use Lapshev\SmsAssistant;

try {
    $sender = new SmsAssistant\Sender('CMC', 'username', 'password');
    $messageId = $sender->sendMessage('+375297777777', 'Message test') . PHP_EOL;
    
} catch( SmsAssistant\Exception $e ) {
    die($e->getMessage());
}

use Lapshev\SmsAssistant;

$sender = new SmsAssistant\Sender('s', 'u', 'p', [
    'debug'             => true,
    'debug_filename'    => __DIR__ . '/out/log.txt'
]);

$sender->sendMessage('+375297777777', 'Message test');