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
bfcccf29
Commit
bfcccf29
authored
Nov 18, 2016
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取验证码日志
parent
55742db8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
14 deletions
+50
-14
Galanz.php
application/controllers/test/Galanz.php
+5
-5
base_helper.php
application/helpers/base_helper.php
+10
-4
SourceGalanz.php
application/libraries/Source/SourceGalanz.php
+2
-1
SourceSuning.php
application/libraries/Source/SourceSuning.php
+8
-4
Uuwise_log_model.php
application/models/Uuwise_log_model.php
+25
-0
No files found.
application/controllers/test/Galanz.php
View file @
bfcccf29
...
...
@@ -62,12 +62,12 @@ class Galanz extends BaseController
{
// $mail= '18611475060@163.com';
// $pwd = 'aimi1012';
//
// $mail= 'weixiuhui1688@163.com';
// $pwd = 'wxh16888';
$mail
=
'weixiuhui1688@163.com'
;
$pwd
=
'wxh16888'
;
// $mail = 'wxh__8888@163.com';
// $pwd = 'WXH888888';
$mail
=
'wxh__8888@163.com'
;
$pwd
=
'WXH888888'
;
$code
=
phone_code
(
$mail
,
$pwd
);
...
...
application/helpers/base_helper.php
View file @
bfcccf29
...
...
@@ -2,10 +2,12 @@
/**
* 验证码解析
* @param string $imagePath
* @param $imagePath
* @param string $sys
* @param string $account
* @return mixed
*/
function
get_uuapi
(
$imagePath
=
''
)
function
get_uuapi
(
$imagePath
,
$sys
=
''
,
$account
=
''
)
{
$CI
=&
get_instance
();
$CI
->
load
->
library
(
'uuApi'
,
null
,
'uuApi'
);
...
...
@@ -16,9 +18,13 @@ function get_uuapi($imagePath = '')
$password
=
'ppcc2015!'
;
$CI
->
uuApi
->
userLogin
(
$username
,
$password
);
$
result
=
$CI
->
uuApi
->
autoRecognition
(
$imagePath
,
1005
);
$
code
=
$CI
->
uuApi
->
autoRecognition
(
$imagePath
,
1005
);
return
$result
;
//记录日志
$CI
->
load
->
model
(
'uuwise_log_model'
);
$CI
->
uuwise_log_model
->
add
(
$sys
,
$account
,
strval
(
$code
));
return
$code
;
}
/**
...
...
application/libraries/Source/SourceGalanz.php
View file @
bfcccf29
...
...
@@ -12,6 +12,7 @@ class SourceGalanz extends Source
{
private
static
$account
=
[];
private
static
$host
=
'http://202.104.26.131:3081'
;
private
static
$app
=
'galanz'
;
public
function
__construct
(
$account
)
{
...
...
@@ -73,7 +74,7 @@ class SourceGalanz extends Source
'loguser'
=>
''
,
'txtUserCode'
=>
self
::
$account
[
'username'
],
'txtPassword'
=>
self
::
$account
[
'pwd'
],
'txtCheckCode'
=>
get_uuapi
(
self
::
$captchaFilePath
),
'txtCheckCode'
=>
get_uuapi
(
self
::
$captchaFilePath
,
self
::
$app
,
self
::
$account
[
'username'
]
),
];
preg_match_all
(
'/<input[^>]+name="([^"]+)"[^>]+value="([^"]*)"/'
,
$content
,
$arr
);
...
...
application/libraries/Source/SourceSuning.php
View file @
bfcccf29
...
...
@@ -274,13 +274,17 @@ class SourceSuning extends Source
}
foreach
(
$srvOrder
[
1
]
as
$key
=>
$val
)
{
$val
=
preg_replace
(
'/"\s+/'
,
'"|||'
,
trim
(
$val
));
$val
=
html_entity_decode
(
trim
(
$val
));
$val
=
preg_replace
(
'/"\s+/'
,
'"|||'
,
$val
);
$val
=
str_replace
(
'="'
,
'||="'
,
$val
);
$val
=
explode
(
'|||'
,
str_replace
(
'"'
,
''
,
$val
));
if
(
!
empty
(
$val
))
{
foreach
(
$val
as
$vall
)
{
$vall
=
explode
(
"="
,
$vall
);
$order
[
$key
][
$vall
[
0
]]
=
html_entity_decode
(
$vall
[
1
]);
if
(
stripos
(
$vall
,
'||='
)
!==
false
)
{
$vall
=
explode
(
"||="
,
$vall
);
$order
[
$key
][
strtolower
(
$vall
[
0
])]
=
$vall
[
1
];
}
}
}
}
...
...
@@ -403,7 +407,7 @@ class SourceSuning extends Source
if
(
$errorCode
[
1
]
==
'needVerifyCode'
)
{
$verifyCodeUrl
=
"https://vcs.suning.com/vcs/imageCode.htm?uuid=
{
$post
[
'uuid'
]
}
"
;
$this
->
SaveUrlCaptcha
(
$verifyCodeUrl
);
$post
[
'verifyCode'
]
=
get_uuapi
(
self
::
$captchaFilePath
);
$post
[
'verifyCode'
]
=
get_uuapi
(
self
::
$captchaFilePath
,
self
::
$app
,
self
::
$account
[
'username'
]
);
$vcresult
=
$this
->
CurlHttpsPost
(
$loginUrl
,
$post
,
$headers
);
$vcresult
[
'data'
]
=
$this
->
HandelHtmlScript
(
$vcresult
[
'data'
]);
...
...
application/models/Uuwise_log_model.php
0 → 100755
View file @
bfcccf29
<?php
/**
* 验证码日志模型
* Class Uuwise_log_model
*/
class
Uuwise_log_model
extends
CI_Model
{
public
$table
=
'uuwise_log'
;
//表名
public
function
add
(
$sys
,
$account
,
$code
)
{
$insertData
=
[
'sys_name'
=>
$sys
,
'account'
=>
$account
,
'code'
=>
$code
,
'created_time'
=>
time
()
];
$this
->
db
->
insert
(
$this
->
table
,
$insertData
);
return
$this
->
db
->
insert_id
();
}
}
\ No newline at end of file
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