2017 © Pedro Peláez
 

yii2-extension yii2-sms

A sms extension for yii2 frameworks

image

koenigseggposche/yii2-sms

A sms extension for yii2 frameworks

  • Wednesday, June 1, 2016
  • by koenigseggposche
  • Repository
  • 1 Watchers
  • 0 Stars
  • 149 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 13 % Grown

The README.md

Yii2 sms

This is a sms extension of Yii2 framewoks., (*1)

It can be used to send sms with different service providers in an easy way., (*2)

SMS Service Providers list:, (*3)

创蓝(Chuanglan):koenigseggposche\sms\target\ChuanglanTarget
国都(Guodu):koenigseggposche\sms\target\GuoduTarget

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require koenigseggposche/yii2-sms "dev-master"

or add, (*6)

"koenigseggposche/yii2-sms": "dev-master"

to the require section of your composer.json file., (*7)

Usage

Configure Yii2 component:, (*8)

[
    'components' => [
        'sms' => [
            'class' => 'koenigseggposche\sms\Sms',
            'targets' => [
                [
                    'class' => 'koenigseggposche\sms\target\ChuanglanTarget',
                ],
                [
                    'class' => 'koenigseggposche\sms\target\GuoduTarget',
                ],
            ],
        ],
    ],
];

Configure Yii2 param:, (*9)

[
    '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:, (*10)

<?php
    $mobile = '13500000000';
    $message = 'test message';
    Yii::$app->sms->send($mobile, $message);
?>

The Versions

01/06 2016

dev-master

9999999-dev

A sms extension for yii2 frameworks

  Sources   Download

BSD-3-Clause

by liwei

extension yii2 sms