PHP code example of toneflix-code / kudi-sms-php

1. Go to this page and download the library: Download toneflix-code/kudi-sms-php 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/ */

    

toneflix-code / kudi-sms-php example snippets


use ToneflixCode\KudiSmsPhp\SmsSender;

$instance = new SmsSender();

use ToneflixCode\KudiSmsPhp\SmsSender;

$instance = new SmsSender('SenderID', 'APIKey');

$instance->sendOtp(
    recipient: '0807...', 
    otp: string, 
    appnamecode: string, 
    templatecode: string
);

$instance->send(
    recipient: '0807...', 
    message: string
);

$instance->sendBulk(
    recipients: ['0807...', '0903...'], 
    message: string
);

$instance->coporate()->send(
    recipient: '0807...', 
    message: string
);

use ToneflixCode\KudiSmsPhp\VoiceSender;

$instance = new VoiceSender();

use ToneflixCode\KudiSmsPhp\SmsSender;

$instance = new SmsSender('CallerId', 'APIKey');

$instance->send(
    to: '0807...', 
    url: string
);

$instance->tts(
    to: '0807...', 
    message: string
);