Avatar of Melody Scott
Melody Scott
Flag for United States of America asked on

Need help setting up recaptcha v2 on Apache server using htaccess

We use a company called my contact form for our forms onsite.

https://www.magickitchen.com/contact-test.html

But they use a standard captcha where you have to enter text, and we have an older base, who have trouble with it, so we'd like to replace it with a recaptcha.

I've got the client side on that page, but I have no idea how to implement the server-side, I'm hoping someone can tell me how to so it with htaccess.

Google says:
When your users submit the form where you integrated reCAPTCHA, you'll get as part of the payload a string with the name "g-recaptcha-response". In order to check whether Google has verified that user, send a POST request with these parameters:
URL: https://www.google.com/recaptcha/api/siteverify
secret (required)      6LdfIn4UAAAAALJ-198KrFzDKKytHk5w9tTipp8m
response (required)      The value of 'g-recaptcha-response'.
remoteip      The end user's ip address.


The reCAPTCHA documentation site describes more details and advanced configurations. https://developers.google.com/recaptcha/docs/verify
Web Development* htacessHTMLJavaScriptApache Web Server

Avatar of undefined
Last Comment
Melody Scott

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
David Favor

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
David Favor

https://www.youtube.com/watch?v=tbvxFW4UJdU provides a quick overview of how Recaptcha v3 works.
Melody Scott

ASKER
Thanks, David, I try to never ask the server guy because he's so busy, but now I know. :) I'll check out the video.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck