Yii 1.1: clickatellsms

Send SMS messages using Clickatell HTTP API.
10 followers

Send SMS messages using Clickatell HTTP API.

Requirements

  • cURL
  • Tested only Yii 1.1.8. May work on older version.
  • Caches session data with Yii::app()->cache->set(); so this must be enabled.

Usage

After installation, to send an SMS simply:

Yii::app()->sms->send(array('to'=>'407xxxxxxxx', 'message'=>'Hello world!'));

Installation

  • Copy the ClickatellSms folder into protected/extensions/
  • Add the following component in your configuration (protected/config/main.php):
'components' => array(
    ...
    'sms' => array(
        'class'=>'ext.ClickatellSms.ClickatellSms',
        'clickatell_username'=>'your clickatell user',
        'clickatell_password'=>'your clickatell password',
        'clickatell_apikey'=>'your clickatell api id',
    ),
    ...
);

Resources

Total 6 comments

#17614 report it
Rohit Suthar at 2014/07/08 04:47am
thanks

it's nice..

#15561 report it
mostofa62 at 2013/11/21 08:03am
how can make a service like Clicktell

hello, i saw you made an api, but can you tell me how can i made system like it? means, the sms reseller system.

#12092 report it
Rajith R at 2013/02/27 04:16am
Thanks Vlad V

Thanks Vlad V

#12074 report it
Vlad V at 2013/02/26 07:16am
Re: "like this?"

@Rajith R: No, the cache component is not part of the sms component. It is a global cache component.

This will do:

'cache' => array( 'class' => 'system.caching.CFileCache', ),
'sms' => array(
        'class'=>'ext.ClickatellSms.ClickatellSms',
        'clickatell_username'=>'your clickatell user',
        'clickatell_password'=>'your clickatell password',
        'clickatell_apikey'=>'your clickatell api id',
        'debug' => true, 'https' => false,
    ),
#12070 report it
Rajith R at 2013/02/26 05:03am
like this?
'sms' => array(
        'class'=>'ext.ClickatellSms.ClickatellSms',
        'clickatell_username'=>'your clickatell user',
        'clickatell_password'=>'your clickatell password',
        'clickatell_apikey'=>'your clickatell api id',
 
 'cache' => array( 'class' => 'system.caching.CFileCache', ),
'debug' => true, 'https' => false,
    ),
#5038 report it
dungdeveloper at 2011/09/09 04:15am
Some comments to run this extension
  1. Register clickatell with account Central API (not account communicator)

  2. Enable any cache component, for example: 'cache' => array( 'class' => 'system.caching.CFileCache', ),

  3. Set debug to true and https to false for sms component: 'debug' => true, 'https' => false, That's all.

Leave a comment

Please to leave your comment.

Create extension