V
V
Vladimir2019-03-14 21:46:47
reCAPTCHA
Vladimir, 2019-03-14 21:46:47

How to test reCAPTCHA v.3 on localhost?

So, how to test reCAPTCHA v.3 on localhost?
I set a search of random logins / passwords with an interval of 0.2 s - it was spinning for more than half an hour with a server response:

{
  <b>"success": true,</b>
  "challenge_ts": "2019-03-14T18:40:36Z",
  "hostname": "localhost",
 <b> "score": 0.9,</b>
  "action": "auth"
}

At the same time, the token was requested for each login/password pair.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andriy4444, 2019-08-15
@Andriy4444

https://www.site4study.com/lesson/86
PHP reCAPTCHA V3 class

include_once 'RecaptchaModule.php';

if ($_SERVER['REQUEST_METHOD'] == 'POST') {

    $recaptcha = new RecaptchaModule();
    if ($recaptcha->isChecked()) {
        echo 'HELLO PEOPLE';
        echo '<br>' . $_POST['name'];
    } else {
        echo 'HELLO ROBOT';
    }

}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question