PHP code example of symfony / lox24-notifier

1. Go to this page and download the library: Download symfony/lox24-notifier 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/ */

    

symfony / lox24-notifier example snippets


use Symfony\Component\Notifier\Message\SmsMessage;

$sms = new SmsMessage('+1411111111', 'My message');

$texter->send($sms);

use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\Lox24\Lox24Options;

$sms = new SmsMessage('+1411111111', 'My message');

$options = (new Lox24Options())
    // set 'voice' per voice call (text-to-speech)
    ->type('voice')
    // set the language of the voice message.
    // If not set or set 'auto', the automatic language detection by message text will be used
    ->voiceLanguage('en')
    // Date of the SMS delivery. If null or not set, the message will be sent immediately
    ->deliveryAt(new DateTime('2024-03-21 12:17:00'))
    // set True to delete the message from the LOX24 database after delivery
    ->deleteTextAfterSending(true)
    // pass any string to the callback object
    ->callbackData('some_data_per_callback');
    
// Add the custom options to the sms message and send the message
$sms->options($options);

$texter->send($sms);