Step 1 Registration
Step 2: Get the api and embed the code into the relevant webpage.
First, enter the code in the template, that is, the report. php template on the form submission page.
<Tr> <td height = "23"> Captcha </td> <td height = "23"> <? Php require_once ('.. /.. /.. /skin/google/recaptchalib. php '); $ publickey = "Enter the applied apikey, Public Key"; echo recaptcha_get_html ($ publickey);?> </Td> </tr>
Next we will post the code to the relevant page.
E/enews/index. php code at the top
<? Phprequire_once ('.. /.. /skin/google/recaptchalib. php '); $ privatekey = "the key you applied for"; $ resp = recaptcha_check_answer ($ privatekey, $ _ SERVER ["REMOTE_ADDR"], $ _ POST ["recaptcha_challenge_field"], $ _ POST ["recaptcha_response_field"]); if (! $ Resp-> is_valid) {die ("Incorrect !! <A href = '# 'onclick = 'javascript: history. back (-1);'> Click here to back! </A> "." (reCAPTCHA said: ". $ resp-> error .")");}
Finally, you need to download the recaptchalib. php file used in the above file.
Put it under the relevant file directory. OK.
Check whether the effect is correct in the next few days.