Vaptcha启动中...
');
}
}
static function check($token)
{
global $G;
if ($G['config']['opencode'] == 'true' || $G['config']['opencode'] == '1') {
if (strlen($token) == 32) {
unset($_POST['token']);
//对待签名参数数组排序
$para_filter = paraFilter($_POST);
$para_sort = argSort($para_filter);
//生成签名结果
$prestr = createLinkstring($para_sort);
$mysign = md5Sign($prestr, $G['config']['token']);
//签名结果与签名方式加入请求提交参数组中
if ($mysign == $token) {
return true;
}else{
return false;
}
}
$info = json_decode(curl_request('http://0.vaptcha.com/validate', 'id=' . $G['config']['codevid'] . '&secretkey=' . $G['config']['codekey'] . '&token=' . $token . '&ip=' . get_real_ip()), true);
if ($info['success'] == '1') {
return true;
} else {
return $info;
}
} else {
return true;
}
}
}