PHP code example of kield01 / smsc-ua

1. Go to this page and download the library: Download kield01/smsc-ua 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/ */

    

kield01 / smsc-ua example snippets



use KielD01\SmscUA\Sender;
use KielD01\SmscUA\Types\Sms;

/** Available Methods List */

/** Set Credential to access the API */
Sender::setCredentials(['__LOGIN__', '__PWD__']);
Sender::setCredentials('__LOGIN__', '__PWD__');

/** Set error messages locale */
Sender::setLocale('ua');

$sms = new Sms();

$response = $sms
    ->setPhones(
    ['380666666666'] || // As an array of numbers
    '380666666666,380666666667;380666666668' || // As the string, delimited by symbols like '`,`, `;`, and/or `|`'
    '380666666666'
    )
    ->setMessage('Test Message') // Sets string as message
    ->send(); // Deliver messages via API