Yii2 SMS extension (短信扩展)
The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies.
To install, either run
$ php composer.phar require lkk/yii2-smser "*"
or add
"lkk/yii2-smser": "*"
to the require
section of your composer.json
file.
return [
'components' => [
'smser' => [
'class' => 'lkk\smser\HuyiSmser',
'username' => 'username',
'password' => 'password',
]
],
];
OR
return [
'components' => [
'smser' => [
'class' => 'lkk\smser\HuyiSmser',
'apikey' => 'wcJRH2mh7BbfIsaWLD4QCbllCaVpZNIp', // 请替换成您的apikey
]
],
];
Yii::$app->smser->send('13000000000', '短信内容');
yii2-smser is released under the BSD 3-Clause License. See the bundled LICENSE
for details.