rocketyang / phpsms
sms send library for php, support the main SMS service provider.
0.1.4
2015-11-24 04:00 UTC
Requires
- php: >=5.4.0
- toplan/task-balancer: ~0.1.1
This package is not auto-updated.
Last update: 2024-10-26 18:49:17 UTC
README
yii2与phpsmshttps://github.com/toplan/phpsms 相结合。
支持的服务商有:
安装
```
composer require 'rocketyang/phpsms:dev-master'
```
快速上手
1. Yii配置
可以作为component组件加载到yii2现有的components;
```
sms => [
'class' => 'Toplan\PhpSms\YiiSms',
'agentsName' => [
'YunPian' => '1 backup',
'Luosimao' => '0 backup'
],
'agentsConfig' => [
'YunPian' => [
'apikey' => '122222343434324d2f17f8aa201611785a'
],
'Luosimao' => [
'apikey' => '3068537108b2xxxxxx71ba9e'
]
]
];
```
2. 超简单的语法糖
```
$sms = Yii::$app->get('sms');
$sms->send('13798164261', 'hello【云片网】');
```