Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethercap/yii2-sms
https://github.com/ethercap/yii2-sms
sms yii yii2
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ethercap/yii2-sms
- Owner: ethercap
- Created: 2017-07-11T09:57:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-11T10:24:58.000Z (over 7 years ago)
- Last Synced: 2024-10-24T15:40:12.772Z (2 months ago)
- Topics: sms, yii, yii2
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yii2 sms
============This is a sms extension of Yii2 framewoks.
It can be used to send sms with different service providers in an easy way.
SMS Service Providers list:
```
创蓝(Chuanglan):ethercap\sms\target\ChuanglanTarget
国都(Guodu):ethercap\sms\target\GuoduTarget
```Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require ethercap/yii2-sms "dev-master"
```or add
```
"ethercap/yii2-sms": "dev-master"
```to the require section of your `composer.json` file.
Usage
-----Configure Yii2 component:
```php
[
'components' => [
'sms' => [
'class' => 'ethercap\sms\Sms',
'targets' => [
[
'class' => 'ethercap\sms\target\ChuanglanTarget',
],
[
'class' => 'ethercap\sms\target\GuoduTarget',
],
],
],
],
];
```Configure Yii2 param:
```php
[
'chuanglan' => [
'url' => 'http://222.73.117.158/msg/HttpBatchSendSM',
'account' => 'YOUR_ACCOUNT',
'pswd' => 'YOUR_PASSWORD',
],
'guodu' => [
'url' => 'http://221.179.180.158:9008/HttpQuickProcess/submitMessageAll',
'OperID' => 'YOUR_ACCOUNT',
'OperPass' => 'YOUR_PASSWORD',
],
];
```Send sms:
```php
sms->send($mobile, $message);
?>
```