php - How to catch successful verification of Google recaptcha automatically? -


i developing website of poems, displaying poem in listing.

the google recaptcha used validate human, trying use differently.

i listing 10 poems @ first user - read next 10 poems want validate user human - asking validate google recaptcha. when user validate recaptcha show next 10 poems.

the purpose of scenario don't want parse site info using script.

now want acknowledge when user verifies captcha automatically, user not need click on next or show more button i.e. when recaptcha verified want let known in way. (may in javascript code)

let me know how can achieve it.

maybe can store in session when user validated human, , show or don't show recaptcha depending on session. assuming using php , recaptcha lib, here's example of how can achieve that.

https://github.com/google/recaptcha

$recaptcha = new \recaptcha\recaptcha($secret); $resp = $recaptcha->verify($grecaptcharesponse, $remoteip); if ($resp->issuccess()) {     // verified!     // store session here, or db or want } else {     $errors = $resp->geterrorcodes(); } 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -