I use google reCAPTCHA V.2 on my website, which runs on a local host on the MAMP server. I am doing the widget integration correctly (both on frontEnd and on the server side), proof that the widget displays correctly on firefox 38.0.1 and that the check works correctly
http://imgur.com/cm83p39
but it shows weirdly on chrome
http : //imgur.com/KHC7hMN
Needless to say, I am doing everything that needs to be done. Again, the proof is that it works in firefox, but not in chrome ... Without going into details, the HTML page looks something like this:
<!DOCTYPE html>
<html>
<head>
<title>reCAPTCHA demo</title>
<script src='https://www.google.com/recaptcha/api.js?hl=en'></script>
</head
<body>
<form id='reCaptcha' action='myValidationScript.php' method='POST'>
<div class="g-recaptcha" data-sitekey="myKey">
</div>
<input type='submit'>
</form>
</body>
</html>
, , PHP , ( , ).
<?php
if(isset($formFields['g-recaptcha-response']))
{$captcha=$formFields['g-recaptcha-response'];}
$secretCaptchaKey='mySecretKey';
$response=file_get_contents(
"https://www.google.com/recaptcha/api/siteverify?secret=$secretCaptchaKey&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']
);
$response = json_decode($response, true);
if($response["success"]==true){echo('yay!!')}
else{echo('nay')}
?>
, , - Google, "no_checkbox", , . , ( ), , ...
, , , , , firefox...
, , . ...
?