reCAPTCHA fails on one domain - same code (except key) passes on other domain
<p>I have two sites
Both of them have a reCAPTCHA 2.0 from google
I have implemented the exact same code on both domains (except for the keys)</p>

<p>To troubleshoot, I have asked the server to show me php-version and extensions:<br>
<a href="http://www.mrm.dk/StackOverflow/success.txt" rel="nofollow noreferrer">Working reCaptcha</a><br>
<a href="http://www.mrm.dk/StackOverflow/error.txt" rel="nofollow noreferrer">Failing reCaptcha</a></p>

<p>I have no idea why it fails on the one domain and not at the other.<br>
Both reCaptchas have just been created and are both version 2.0</p>

<p>The basic code for both is:<br></p>

<p><strong>Client side:</strong></p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="da-DK"&gt;

&lt;head&gt;
&lt;meta charset="UTF-8"&gt;
&lt;title&gt;Recaptcha test&lt;/title&gt;
&lt;script src='https://www.google.com/recaptcha/api.js?hl=da'&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;h1&gt;reCAPTCHA&lt;/h1&gt;
&lt;form action="responce.php" method="post"&gt;

    &lt;p&gt;Name: &lt;input type="text" name="name"&gt;&lt;/p&gt;
    &lt;p&gt;Mail: &lt;input type="text" name="email"&gt;&lt;/p&gt;
    &lt;div class="g-recaptcha" data-sitekey="--My-Site-Key--"&gt;&lt;/div&gt;
    &lt;input type="submit" value="test"&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>Server side:</strong>
    

<pre><code>$sender_name=stripslashes($_POST["name"]);
$sender_email=stripslashes($_POST["email"]);

$secret="--My-Server-Key--";
$response=$_POST["g-recaptcha-response"];
$verify=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret={$secret}&amp;response={$response}");
$captcha_success=json_decode($verify);

if ($captcha_success-&gt;success==false) {
$success="isFalse";
}
else if ($captcha_success-&gt;success==true) {
$success="isTrue";
}

echo $success . "&lt;br&gt;";
echo 'php version =&gt; '. phpversion() . '&lt;br&gt;';
foreach (get_loaded_extensions() as $i =&gt; $ext) {
echo $ext .' =&gt; '. phpversion($ext). '&lt;br/&gt;'; 
}
?&gt;
</code></pre>