PHP code example of odinshat / yii-clickatell-smscomponent

1. Go to this page and download the library: Download odinshat/yii-clickatell-smscomponent 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/ */

    

odinshat / yii-clickatell-smscomponent example snippets


    'components'=>array(
        'smsSend'=>array(
            'class' => 'application.components.SendSmsComponent',
            'api_user'  => 'API username',
            'api_pass'  => 'API password',
            'api_from'  => 'FromName',
            'api_id'    => 0000000
        ),
        [...]
    ),

$sms = Yii::app()->smsSend;
$sms->postSms('070000000', "Some message", "SenderName");

$sms = Yii::app()->smsSend;
if($sms->queryCoverage(070000000)){
    echo 'Can send';
}