ReCaptcha keeps saying im a bot, doesn't ever succeed?

后端 未结 1 1089
遇见更好的自我
遇见更好的自我 2020-12-12 02:46

I was using the old ReCaptcha on my site but just upgrading to the new ReCaptcha i\'ve 3-4 different tutorials but it keeps failing and giving the fail error.

HTML

1条回答
  •  离开以前
    2020-12-12 03:02

    Step 1:

    You will need to create a public and a private key here.

    Step 2:

    Include this library to process the information on the server.

    The code:

    verify(
            $_POST["g-recaptcha-response"],
            $_SERVER["REMOTE_ADDR"]
          );
    
          if($r->isSuccess()){
            echo 'success';
          } else {
            echo 'failed';
          }
        } else {
          die('client failure, enable js or update browser');
        }
      } else {
        die('form failure');
      }
    ?>
    
    
    
      
        ReCaptcha 2.0
      
      
         

    This will say either success or failed depending on the input.

    0 讨论(0)
提交回复
热议问题