PHP code example of rashpil91 / yii2-smsc

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

    

rashpil91 / yii2-smsc example snippets


'components' => [
	...
        'smsc' => [
            'class' => 'rashpil91\smsc\Smsc',
            'config' => [
                'login' => "", //Ваш логин
                'psw' => "", //Ваш пароль
                'debug' => !1, //Включить режим отладки
                'charset' => 'utf-8'
            ]
        ], 
	...
],

Yii::$app->smsc->Message(89998887766, "Казна пустеет, милорд");

Yii::$app->smsc-getStatus(89998887766, 1); //Где 1 это ID сообщения, полученный при отправке

Yii::$app->smsc->debug_details;

Yii::$app->smsc->getCost(89998887766, "Казна пустеет, милорд");

Yii::$app->smsc->getBalance();

php composer.phar