richweber / yii2-alpha-sms
为 Yii 2 框架提供的 AlphaSMS API
1.0.2
2017-03-08 13:24 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-13 10:40:49 UTC
README
阿尔法SMS - 在乌克兰市场上领先的 SMS 服务公司,为企业和个人客户提供。
公司使用直接连接到国家 GSM 运营商和国际 SMS-gate,确保将消息传递给乌克兰、独联体和世界其他国家的手机网络用户。
安装扩展
建议使用 composer 安装扩展。
执行以下命令
php composer.phar require richweber/yii2-alpha-sms "*"
或者
"richweber/yii2-alpha-sms": "*"
将以下内容添加到您的 composer.json
文件的 require
部分。
应用程序配置
配置示例
'components' => [ ... 'alphaSms' => [ 'class' => 'richweber\alpha\sms\AlphaSms', 'sender' => 'AlphaName', 'login' => '380505550505', 'password' => 'password', // or // 'key' => '184452c06ft1e2f548aa18243fb6226h79764563', ], ... ],
要使用 AlphaSMS 服务,使用了四个主要方法
message()
status()
delete()
balance()
方法参数是一个包含必要参数的数组 $data。
$data = [ 'text' => 'Text message', 'recipient' => 380505550505, 'sender' => 'AlphaName', 'type' => 0, 'date_beg' => '1409770256', 'date_end' => '1409770291', 'url' => 'http://mysite.com', ];
许可证
yii2-alpha-sms 在 BSD 3-Clause 许可证下发布。有关详细信息,请参阅附带文件 LICENSE.md
。