|
|
|
@ -114,6 +114,29 @@ if ($hesk_settings['secimg_use'] && !isset($_SESSION['img_verified'])) {
|
|
|
|
|
} else {
|
|
|
|
|
$hesk_error_buffer['mysecnum'] = $hesklang['recaptcha_error'];
|
|
|
|
|
}
|
|
|
|
|
} // Using Netsyms Captcheck
|
|
|
|
|
elseif ($hesk_settings['recaptcha_use'] == 3) {
|
|
|
|
|
$url = 'https://captcheck.netsyms.com/api.php';
|
|
|
|
|
$data = [
|
|
|
|
|
'session_id' => $_POST['captcheck_session_code'],
|
|
|
|
|
'answer_id' => $_POST['captcheck_selected_answer'],
|
|
|
|
|
'action' => "verify"
|
|
|
|
|
];
|
|
|
|
|
$options = [
|
|
|
|
|
'http' => [
|
|
|
|
|
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
|
|
|
|
'method' => 'POST',
|
|
|
|
|
'content' => http_build_query($data)
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
$context = stream_context_create($options);
|
|
|
|
|
$result = file_get_contents($url, false, $context);
|
|
|
|
|
$resp = json_decode($result, TRUE);
|
|
|
|
|
if ($resp['result'] === true) {
|
|
|
|
|
$_SESSION['img_verified'] = true;
|
|
|
|
|
} else {
|
|
|
|
|
$hesk_error_buffer['mysecnum'] = $hesklang['recaptcha_error'];
|
|
|
|
|
}
|
|
|
|
|
} // Using PHP generated image
|
|
|
|
|
else {
|
|
|
|
|
$mysecnum = intval(hesk_POST('mysecnum', 0));
|
|
|
|
|