If you do not have keys already then visit https://www.google.com/recaptcha/admin to generate them. Edit this file and set the respective keys in $siteKey and $secret. Reload the page after this.
That's it. Everything is working. Go integrate this into your real project.
The following error was returned: getErrorCodes() as $code) { echo '' , $code , ' '; } ?>
Check the error code reference at https://developers.google.com/recaptcha/docs/verify#error-code-reference.
Note: Error code missing-input-response may mean the user just didn't complete the reCAPTCHA.
Complete the reCAPTCHA then submit the form.