PHP code example of mobileactive / yii2-mobak

1. Go to this page and download the library: Download mobileactive/yii2-mobak 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/ */

    

mobileactive / yii2-mobak example snippets


    'components' => [

        .........

        'sms' => [
            'class' => mobak\yii2\Base,
            'login' => 'ВАШ_ЛОГИН',
            'password' => 'ВАШ_ПАРОЛЬ'
        ],

        .........

    ];


$sms = Yii::$app->sms->getSender();

// Отправка СМС-сообщения
$result = $sms->send([
         'message' => "Your message text",
         'sender' => "Info",
         'phone' => '79194839xxx'
     ]);

// Получить результат в виде массива
$result->toArray();

......


php composer.phar