Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
weixiuhui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
蒋林
weixiuhui
Commits
b220f25b
Commit
b220f25b
authored
Jan 16, 2017
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
苏宁-验证码规则
parent
d463a6a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Suning.php
application/controllers/test/Suning.php
+1
-1
base_helper.php
application/helpers/base_helper.php
+3
-3
No files found.
application/controllers/test/Suning.php
View file @
b220f25b
...
...
@@ -31,7 +31,7 @@ class Suning extends BaseController
1
=>
[
'u'
=>
'18771093166@163.com'
,
'p'
=>
'wgw19771230'
],
];
$key
=
1
;
$key
=
0
;
self
::
$testu
=
$account
[
$key
][
'u'
];
self
::
$testp
=
$account
[
$key
][
'p'
];
}
...
...
application/helpers/base_helper.php
View file @
b220f25b
...
...
@@ -183,11 +183,11 @@ function phone_code($mail, $pwd)
if
(
$num
)
{
$body
=
imap_base64
(
imap_fetchbody
(
$mbox
,
imap_num_msg
(
$mbox
),
1
));
preg_match
(
'/
\d{6}
/'
,
$body
,
$code
);
preg_match
(
'/
验证码[^\d]+(\d{6})
/'
,
$body
,
$code
);
preg_match
(
'/2\d{3}-[\s\S]{14}/'
,
$body
,
$date
);
if
(
isset
(
$code
[
0
])
&&
isset
(
$date
[
0
]))
{
$result
[
'code'
]
=
$code
[
0
];
if
(
isset
(
$code
[
1
])
&&
isset
(
$date
[
0
]))
{
$result
[
'code'
]
=
$code
[
1
];
$result
[
'date'
]
=
$date
[
0
];
$result
[
'st'
]
=
time
()
-
strtotime
(
$result
[
'date'
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment