public function GetValidationResult() { if (is_null($this->Captcha)) { LBD_HttpHelper::BadRequest('captcha'); } // identifier of the particular Captcha object instance $instanceId = $this->GetInstanceId(); if (is_null($instanceId)) { LBD_HttpHelper::BadRequest('instance'); } $mimeType = 'application/json'; $this->output->set_content_type($mimeType); // JSON-encoded validation result $result = $this->Captcha->AjaxValidate($userInput, $instanceId); $this->Captcha->CaptchaBase->Save(); $resultJson = $this->GetJsonValidationResult($result); return $resultJson; }
function GetValidationResult() { // saved data for the specified Captcha object in the application $captcha = GetCaptchaObject(); if (is_null($captcha)) { LBD_HttpHelper::BadRequest('captcha'); } // identifier of the particular Captcha object instance $instanceId = GetInstanceId(); if (is_null($instanceId)) { LBD_HttpHelper::BadRequest('instance'); } // code to validate $userInput = GetUserInput(); while (ob_get_length()) { ob_end_clean(); } ob_start(); try { // response MIME type & headers header('Content-Type: text/javascript'); header('X-Robots-Tag: noindex, nofollow, noarchive, nosnippet'); // JSON-encoded validation result $result = false; if (isset($userInput) && isset($instanceId)) { $result = $captcha->Validate($userInput, $instanceId, LBD_ValidationAttemptOrigin::Client); $captcha->Save(); } $resultJson = GetJsonValidationResult($result); echo $resultJson; } catch (Exception $e) { header('Content-Type: text/plain'); echo $e->getMessage(); } ob_end_flush(); exit; }
function GetValidationResult() { // saved data for the specified Captcha object in the application $captcha = GetCaptchaObject(); if (is_null($captcha)) { LBD_HttpHelper::BadRequest('captcha'); } // identifier of the particular Captcha object instance $instanceId = GetInstanceId(); if (is_null($instanceId)) { LBD_HttpHelper::BadRequest('instance'); } // code to validate $userInput = GetUserInput(); // response MIME type & headers header('Content-Type: text/javascript'); // JSON-encoded validation result $result = false; if (isset($userInput) && isset($instanceId)) { $result = $captcha->Validate($userInput, $instanceId, LBD_ValidationAttemptOrigin::Client); $captcha->Save(); } session_write_close(); $resultJson = GetJsonValidationResult($result); echo $resultJson; }
public static function GetRemoteScriptEnabled($_ovz8t9j8hjayrxexpqvtc9cly8) { $_iqeccth2076sqdkntimqsxm425 = $_ovz8t9j8hjayrxexpqvtc9cly8; $_iqeccth2076sqdkntimqsxm425 = true; if (LBD_HttpHelper::IsLocalRequest()) { $_iqeccth2076sqdkntimqsxm425 = false; } return $_iqeccth2076sqdkntimqsxm425; }
public static function GetRemoteScriptEnabled($_1rit8ixoeeavdno7) { $_lybs6gutgk4ly35g = $_1rit8ixoeeavdno7; $_lybs6gutgk4ly35g = true; if (LBD_HttpHelper::IsLocalRequest()) { $_lybs6gutgk4ly35g = false; } return $_lybs6gutgk4ly35g; }
public static function CheckForIgnoredRequests() { if (array_key_exists("HTTP_USER_AGENT", $_SERVER) && false !== strpos($_SERVER["HTTP_USER_AGENT"], "GbPlugin")) { LBD_HttpHelper::IgnoreRequest(); } }
public static function GetRemoteScriptEnabled($_ixcaqtt89fj9r75irwe3co96an) { $_190aqui9m0hxy3k368bt0 = $_ixcaqtt89fj9r75irwe3co96an; $_190aqui9m0hxy3k368bt0 = true; if (LBD_HttpHelper::IsLocalRequest()) { $_190aqui9m0hxy3k368bt0 = false; } return $_190aqui9m0hxy3k368bt0; }
/** * The client requests the Captcha validation result (used for Ajax Captcha validation). * * @return json */ public function getValidationResult() { if (is_null($this->captcha)) { \LBD_HttpHelper::BadRequest('captcha'); } // identifier of the particular Captcha object instance $instanceId = $this->getInstanceId(); if (is_null($instanceId)) { \LBD_HttpHelper::BadRequest('instance'); } $mimeType = 'application/json'; header("Content-Type: {$mimeType}"); // code to validate $userInput = $this->getUserInput(); // JSON-encoded validation result $result = $this->captcha->AjaxValidate($userInput, $instanceId); $this->captcha->CaptchaBase->Save(); $resultJson = $this->getJsonValidationResult($result); return $resultJson; }