修复极验的问题
This commit is contained in:
@@ -78,6 +78,8 @@ function get_curl($url, $post=0, $referer=0, $cookie=0, $header=0, $ua=0, $nobao
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10); // 10秒超时
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); // 连接超时5秒
|
||||
$ret = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return $ret;
|
||||
|
||||
@@ -33,7 +33,7 @@ class GeetestLib
|
||||
'json_format' => self::JSON_FORMAT
|
||||
];
|
||||
$params = array_merge($params, $public_params);
|
||||
$url = 'http://api.geetest.com/register.php?' . http_build_query($params);
|
||||
$url = 'https://api.geevisit.com/register.php?' . http_build_query($params);
|
||||
$res = get_curl($url);
|
||||
$arr = json_decode($res, true);
|
||||
if($arr && isset($arr['challenge'])){
|
||||
@@ -98,7 +98,7 @@ class GeetestLib
|
||||
'json_format' => self::JSON_FORMAT
|
||||
];
|
||||
$params = array_merge($params, $public_params);
|
||||
$url = 'http://api.geetest.com/validate.php';
|
||||
$url = 'https://api.geevisit.com/validate.php';
|
||||
$res = get_curl($url, http_build_query($params));
|
||||
$arr = json_decode($res, true);
|
||||
if($arr && isset($arr['seccode'])){
|
||||
|
||||
Reference in New Issue
Block a user