定制 liangzoe/yii2-mobilesmser 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

liangzoe/yii2-mobilesmser

最新稳定版本:v1.1

Composer 安装命令:

composer require liangzoe/yii2-mobilesmser

包简介

SMS extension for yii2

README 文档

README

Send text messages with api of SMS platform

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require liangzoe/yii2-mobilesmser "*"

or add

"liangzoe/yii2-mobilesmser": "*"

to the require section of your composer.json file.

Usage

  1. Let 's add into Component config in your main config file
'smser' => [
    'smser' => [
       	  'class' => 'liangzoe\mobilesmser\TextSmser',
	        'url' => '',
	        'username' => '',
	        'password' => '',
    ],
],

```use in phpfile
Yii::$app->smser->sendSMS('手机号码', '短信内容');
```

'''reference in the view'''
   Countdown with jquery
   
   
   <script type="text/javascript">
   
   var wait=60; 
	
		function time(o) {//o为按钮对象
		
			if (wait == 0) { 
		
				o.removeAttribute("disabled"); 
			
				o.value="免费获取短信动态码"; 
				
				wait = 60; 
		
			} else { 
	
				o.setAttribute("disabled", true); //倒计时中,禁止点击按钮
			
				o.value= wait + "秒后重新发送"; 
			
				wait--; 
	
				setTimeout(function() { time(o);}, 1000);
	
			} 
</script>

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-09-09