class Konga_Google_Recaptcha
{
public function getHtmlCode($publicKey)
{
$setTheme = '<script type="text/javascript">
var RecaptchaOptions = {
theme : \'clean\'
};
</script>';
return $setTheme . html_entity_decode(recaptcha_get_html($publicKey));
}
/**
* @param string $privateKey
* @param string $remoteAddr
* @param string $challengeField
* @param string $responseField
*
* @return ReCaptchaResponse
*/
public function checkAnswer($privateKey, $remoteAddr, $challengeField, $responseField)
{
$resp = recaptcha_check_answer ($privateKey,
$remoteAddr,
$challengeField,
$responseField);
return $resp;
}
}