uguranyum/yii2-zadarma-sms
Composer 安装命令:
composer require uguranyum/yii2-zadarma-sms
包简介
Zadarma Sms Extension for yii2
关键字:
README 文档
README
Yii2 extension for work with Zadarma API. Allows to work with API methods.
##Requirements
- Yii2 PHP Framework
- PHP >= 5.3.0
- cURL
##DOWNLOAD VIA COMPOSER
composer require uguranyum/yii2-zadarma-sms
##How to use
Before the using controller please define Zadarma class
use uguranyum\zadarma\Zadarma;
For sending Sms
$params = [
'number' => 'YOUR PHONE NUMBER',
'message' => 'PLEASE WRITE YOUR MESSAGE HERE',
];
$zadarma = new Zadarma("ZADARMA API KEY", "ZADARMA API SECRET");
$answer = $zadarma->call('/v1/sms/send/', $params, 'post');
$answerObject = json_decode($answer);
print_r($answerObject);
For looking statics
$params = array(
'start' => '2015-01-01 00:00:00',
'end' => '2015-01-31 00:00:00',
/*'sip' => 'YOURSIP',*/
/*'cost_only' => true,*/
/*'type' => 'toll'*/
);
$zadarma = new \Zadarma_API\Client(KEY, SECRET);
$answer = $zadarma->call('/v1/statistics/', $params);
$answerObject = json_decode($answer);
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-05