Yii 1.1: yskebbysms

Send sms using Skebby.it gateway
2 followers

YiiFramework extension that helps you send SMS messages using Skebby API with only one line of code. You need a Skebby subscription to send messages.

Requirements

Tested on Yii 1.1.11, but should run on lower versions as well.

Usage

To send a message:

Yii::app()->skebbySms->send(array('to'=>'xxxxxx','message'=>'hello world'));

To retrieve the remaining credit:

Yii::app()->skebbySms->getCredit(YSkebbySms::CREDIT_TYPE_BASIC);

The first parameter is the return type, can be empty to return all your credits, or a specific type. The second can be the same config used for the send, except for the method which will be overwritten.

Installation

  1. Copy the YSkebbySms folder to your extensions folder (usually in protected/extensions/) If you prefeer to clone, git clone https://github.com/YetOpen/YSkebbySms.git protected/extensions/YSkebbySms
  2. In configuration, add the following component:

    'components' => array(
    ...
    'skebbySms' => array(
        'class'=>'ext.YSkebbySms.YSkebbySms',
        'username'=>'your Skebby user',
        'password'=>'your Skebby password',
    ),
    ...
    )
  3. Send messages as follows:

    $result = Yii::app()->skebbySms->send([per-sms configurations]);
    if ($result['result'])
    echo "Message sent";
    else {
    echo "Message NOT sent: ".$result['message'];
    }

Links

http://yiiframework.com
http://www.skebby.it/business/index/send-docs/
http://www.skebby.it/business/index/code-examples/

TODO

There's a lot of things to do, like implement sending to several recipients, scheduled send, and other advanced features of Skebby... See link above.

Be the first person to leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: Maxxer
  • Category: Others
  • Votes: -1
  • Downloaded: 249 times
  • Created on: Oct 29, 2012
  • Last updated: Oct 29, 2012
  • Tags: sms, skebby