Google ReCaptcha v2 stopped working?

I am running Google ReCaptcha on 3 sites (maybe 4). They were all working fine. Not sure when as I was just recently made aware, but none of them work anymore ??? Did google change something or is it because I updated php??
The problwm is in the response - no matter what I try, I cannot verify that I am human.

        $ip = $_SERVER['REMOTE_ADDR'];
         $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip);
         $responseKeys = json_decode($response,true);
         if(intval($responseKeys["success"]) !== 1) {
           echo '<h4 style="color:#c30000;text-align:center;">Sorry, we cannot verify that you are human</h4><br><br>';
         } else {

Any idea why would ber greatly helpful.
Thanx

Have you checked your browser’s developer tools, while visiting a page and submitting the captcha, if there are any relevant errors?

When the captcha fails, there is an error-codes element in the response - https://developers.google.com/recaptcha/docs/verify
You should (already) be logging this information so that you know what type of failures are occurring.

Not sure or understand how to detect captcha error messages

Sponsor our Newsletter | Privacy Policy | Terms of Service