Correct way to implement Google ReCaptcha

Hey everyone.

What is the correct way to implement Google’s ReCaptcha? I have basically come across two strategies:

Simple php script that validates the response from google to validate recpatcha, if its valid then the form gets sent.

The second method is using javascript to disable the submit button, and on a callback where google verifies the captcha, it enables the submit button so the user can now submit the form.

Are both ways feasible? Even if javascript is disabled on the browser, the second method does work.

Both of those should be done.

The PHP code is the minimal that should be done, to ensure that it works in the largest number of scenarios practical.
The JavaScript part helps to improve the user experience, which doesn’t replace the PHP checks.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.