Nuevo Google reCAPTCHA

New Google reCAPTCHA

Google advertisement a new service to avoid the spam and the attacks to your website.
calls it "NO CAPTCHA for reCAPTCHA«. It is designed for protect your website ofhe spam and the abuses.

in this tutorial go to show you how to integrate in your website; for purposes demo I did a simple script and you can improve it

banner21. Register your website and you will get the key Secret: (Login to your Google account fill out and submit the form)


Once registered your website, Google will provide you next two informations.
–Site key
–Secret key

2. Integrate it to the form of your web page

To integrate it into your website needs put the following code andno the tags HTML of your form <HEAD>.

<script src=’’></script>

and to show the reCAPTCHA widget in your form You need to put the following code just before the "submit" button of your form

<div classes="g-recaptcha" data-sitekey="== Your site Key =="></div>

3. Example of how to put in a comment form

It will generate a form
    <title>Google replay demo – Codeforgeek</title>
    <script src=''></script>
    <h1>Google reCAPTHA Demo</h1>
    <shape id="comment_form" action="form.php" method="post">
      <input type="e-mail" place holder="Type your email" size="40"><br><br>
      <textarea yam="comment" rows=«8» cols="39"></textarea><br><br>
      <input type=submit yam=submit value="Post comment"><br><br>
      <div classes="g-recaptcha" data-sitekey="=== Your site key ==="></div>
Here we perform the validation of the form
<?php         $email;$comment;$captcha;
          threw out &#039;<h2>Please check the captcha form.</h2>&#039;;
        $response=file_get_contents(“ SECRET KEY&response=”.$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']);
          threw out &#039;<h2>You are spammer! Get the @$%K out</h2>&#039;;
          threw out &#039;<h2>Thanks for posting comments.</h2>&#039;;
Google official website of the new recaptcha:




1 comment

Comments are closed.