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 ¶
- 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
In configuration, add the following component: ~~~ [php] 'components' => array( ... 'skebbySms' => array(
'class'=>'ext.YSkebbySms.YSkebbySms', 'username'=>'your Skebby user', 'password'=>'your Skebby password',
), ... ) ~~~
Send messages as follows: ~~~ [php] $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.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.