How can I integrate reCaptcha v3?
I would like to upgrade the captcha on one of my existing forms to reCaptcha v3, is this possible?
I would like to upgrade the captcha on one of my existing forms to reCaptcha v3, is this possible?
Yes. Just follow the reCaptcha v3 documentation to integrate it into your page.
Thanks Ray, what parts of the original reCapture would need removing for it to not interfere with reCapture version 3?
I'm really not sure. That would probably be covered in the reCaptcha v3 documentation. I'd probably have to use a premier support ticket to help since I'm not that familiar with what you have so far. My guess is that the code updates wouldn't be that drastic, but it would take some research.
I will have a go myself using my localhost version of the website, if I can't work it out I will submit a premier support ticket. Thanks Ray.
We got this working in a premier support ticket this morning.
Thank for your help today Ray. One other thing, the documentation states that you should verify the 'action'. I did this by editing the if statement like so:
<?php
$respObj = json_decode($resp );
if ($respObj->success && $respObj->action == 'homepage') {
if ($respObj->score < 0.5) {
header("location: " .$_SERVER["REQUEST_URI"]);
die();
}
} else {
header("location: " .$_SERVER["REQUEST_URI"]);
die();
}
?>
Would this be ok?
I'm not sure... does it work?
Maybe add:
$respObj = json_decode($resp );
var_dump($respObj);
die();
if ($respObj->success && $respObj->action == 'homepage') {
I thought we changed the action to login? Adding the debug code should help you see what the action is so you can test it's value correctly.
Seems to work OK. I have changed the action name to 'contact/us/form' based on the examples: https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php as the action name looks like it can be anything as ling as they only contain alphanumeric characters and slashes, and must not be user-specific.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.