PHP code example of fduch2k / yii-sms-manager

1. Go to this page and download the library: Download fduch2k/yii-sms-manager 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/ */

    

fduch2k / yii-sms-manager example snippets


return array(
    //....
    'components' => array(
        'sms' => array(
            'class'=>'TSSmsManager',
            'alertPhone'=>'mobile phone number for sending sms with notification',
            'alertEmail'=>'email for sending notification',
            'gateways'=>array(
                array(
                    'class'=>'TSAtomParkGateway',
                    'sender'=>'senderid1',
                    'username'=>YOUR_USERNAME,
                    'password'=>YOUR_PASSWORD,
                ),
                array(
                    'class'=>'TSSmsFeedBackGateway',
                    'sender'=>'senderid2',
                    'username'=>YOUR_USERNAME,
                    'password'=>YOUR_PASSWORD,
                ),
            ),
        ),
    )
);

Yii::app()->sms->send(
    array(
        array(
            $phoneNumber1=>array('Alex', 'qwerty'), 
            $phoneNumber2=>array('Peter', '123456')
        )
    ), 
    'Hello, %1%! Your password is %2%'
);

php composer.phar