class Konga_Google_Recaptc ha public function getHtmlCode publicKey se

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
}
}