Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
xiaowei
9 years ago
Commit
d9109d2e8f4c5a4bf99e323852fca108a9319229
1 parent
71ae3cb4
PC登录注册防恶意攻击
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
yohobuy/www.yohobuy.com/application/modules/Passport/controllers/Register.php
yohobuy/www.yohobuy.com/application/modules/Passport/controllers/Register.php
View file @
d9109d2
...
...
@@ -131,9 +131,12 @@ class RegisterController extends WebAction
break
;
}
//发送代码
$send_code_key
=
md5
(
'send_code_'
.
$area
.
'_'
.
$mobile
);
$send_code_times
=
Cache
::
increment
(
$send_code_key
,
1
,
0
,
3600
);
if
(
$send_code_times
>
50
)
{
$sendCodeKey
=
md5
(
'send_code_'
.
$area
.
'_'
.
$mobile
);
if
(
!
Cache
::
get
(
$sendCodeKey
))
{
Cache
::
set
(
$sendCodeKey
,
0
);
}
$sendCodeTimes
=
Cache
::
increment
(
$sendCodeKey
,
1
,
0
,
3600
);
if
(
$sendCodeTimes
>
50
)
{
$data
[
'message'
]
=
'发送验证码太多'
;
break
;
}
...
...
Please
register
or
login
to post a comment