Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Mod] reCaptcha  (Read 3086 times)

feiming

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
    • My sNews Mods
[Mod] reCaptcha
« on: May 24, 2008, 08:54:20 PM »

Description:Preventing spam while helping to digitize books.

Screenshot


Demo
http://campuschronicle.cc/news/login/

Step 0
Backup

Step 1
Download this recaptcha.txt rename to recaptcha.php and upload.
Download this http://code.google.com/p/recaptcha/downloads/list?q=label:phplib-Latest,extract recaptcha-php-*.zip and upload recaptchalib.php.
*both file should be in the same directory with snewsMU.php

Step 2
In recaptcha.php,enter your reCaptcha public and private key which you can get it from here http://recaptcha.net/whyrecaptcha.html
Quote
   $publickey = "your reCaptcha public key";
   $privatekey = "your reCaptcha private key";

Step 3
In snewsMU.php,find
Quote
/*** END OF SETTINGS & VARIABLES, EDIT BELOW THIS LINE ONLY IF YOU KNOW WHAT YOU'RE DOING ***/
and paste
Quote
/*** END OF SETTINGS & VARIABLES, EDIT BELOW THIS LINE ONLY IF YOU KNOW WHAT YOU'RE DOING ***/

include('recaptcha.php');

Step 4
Find all of
Quote
is_numeric($_POST['calc']) && mathCaptcha($_POST['calc'], $_POST['sum'])
and replace them with
Quote
reCaptcha($_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field'])

Step 5
Find all of
Quote
mathCaptcha($_POST['calc'], $_POST['sum'])
and replace them with
Quote
reCaptcha($_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field'])

Step 6
Find all of
Quote
mathCaptcha()
and replace them with
Quote
reCaptcha()
« Last Edit: May 24, 2008, 09:12:30 PM by feiming »
Logged