liasica/yii2-chinasms

Yii2短信-中国

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2017-04-30 16:49 UTC

This package is auto-updated.

Last update: 2024-10-24 04:47:59 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads Daily Downloads

安装

composer update "liasica/yii2-chinasms:dev-master"

使用方法

华信

  • 配置
'huaxin' => [
    'class'       => 'liasica\chinasms\Huaxin',
    'account'     => '账号',
    'password'    => '发送密码',
    'cachePrefix' => 'cache_chinasms_huaxin_',
    'useJsonUrl'  => true,
]
  • 使用
$huaxin = \Yii::$app->huaxin;
$ret    = $huaxin->smsPostSend($sms_type, $phone, $code);
$limit  = $huaxin->smsSendRateLimit($sms_type, $phone);
var_dump($ret);
var_dump($limit);
$huaxin = \Yii::$app->huaxin;
$ret    = $huaxin->smsPostSend($sms_type, $phone, $code, true);
var_dump($ret);