With help from echicken I got my reCaptcha working for new users.
In newuser.inc I used the standard form from reCaptcha.
In newuser.ssjs , right above the Validate date comment/section:
/*Validate Captcha*/
if(http_request.query["recaptcha_challenge_field"] != "") {
load("http.js");
var response;
var http;
var captchaChallenge="&challenge="+http_request.query["recaptcha_challenge_field"];
var captchaResponse="&response="+http_request.query["recaptcha_response_field"];
var captchaIP="&remoteip="+http_request.remote_ip;
var captchaPrivateKey="&privatekey=yourprivatekey";
// Create HTTPRequest object 'http'
http = new HTTPRequest();
response = http.Post(
"
http://www.google.com/recaptcha/api/verify",
captchaChallenge+captchaResponse+captchaIP+captchaPrivateKey
);
//print(response);
if(response !== "true\nsuccess" ) {
err=1;
template.err_message+="Bad captcha\r\n";
template.errs["captcha"]="Captcha is incorrect.";
} /*else {
err=1;
template.err_message+="Good captcha\r\n";
template.errs["captcha"]="Captcha is correct.";
}*/
}
---
þ Synchronet þ Digital 52 BBS - digital52.com