It accepts ALL text that is entered in the field...
Can someone explain why it accepts all input?
Integrated in Table (there are more fields in the table):
<form method="post" action="verify.php">
<?php
require_once('recaptchalib.php');
$publickey = "My key";
echo recaptcha_get_html($publickey);
?>
</form>
___________________________________________________________________________
Verify.php:
<?php
require_once('recaptchalib.php');
$privatekey = "MyKey";
$response = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it
again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
// Your code here to handle a successful verification
}
?>
> Verify.php:
>
> <?php
> require_once('recaptchalib.php');
> $privatekey = "MyKey";
> $response = recaptcha_check_answer ($privatekey,
> $_SERVER["REMOTE_ADDR"],
> $_POST["recaptcha_challenge_field"],
> $_POST["recaptcha_response_field"]);
>
> if (!$resp->is_valid) {
> // What happens when the CAPTCHA was entered incorrectly
> die ("The reCAPTCHA wasn't entered correctly. Go back and try it
> again." .
> "(reCAPTCHA said: " . $resp->error . ")");
> } else {
> // Your code here to handle a successful verification
echo "<pre>\n";
print_r($_POST);
print_r($_SERVER); // ensure at least some extra output
echo "</pre>";
> }
> ?>
What (extra) text gets printed?
--
PJH
http://shabbleland.myminicity.com/tra
http://www.chavgangs.com/register.php?referer=9375
The reCAPTCHA wasn't entered correctly. Go back and try it again.
(reCAPTCHA said: )
But if i fill in the form it will accept wrong text. Or empty.
My form is build up in form.php, the mailer script is in
formmailer.php the reCaptcha validator lies in verify.php.
Can it be that the formmailer.php wich controls spam protection and
other validations, sends the mail without needing reCAPTCHA to
validate?
I use formmailer from: http://www.dbmasters.net/node/18
It works without the reCAP.
I only wanted to use real reCAP instead of "sort of reCAP" from
dbmasters.
Can this script bypass reCAP?
If i integrate Verify.php into the formmailer.php ( i put the verify
in top of formmailer)
And change the link from Verify to formmailer it ALWAYS gives a error
as if the text is entered wrong.
I will awnser tomorrow im no mad about this stupid thing.
I even couldnt go back and repost it all is gone,....
Can't you ask the author of the script?
--
Charles Sweeney
http://FormToEmail.com
PHP mail script with reCAPTCHA
The reCAPTCHA wasn't entered correctly. Go back and try it again.
(reCAPTCHA said: )
This is my php test form (only recaptcha);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" action="verify.php">
<?php
require_once('recaptchalib.php');
$publickey = "xXxXxXxXxXxXxXxXx";
echo recaptcha_get_html($publickey);
?>
</form>
</body>
</html>
_____________________________________________
And this the verify.php :
<?php
require_once('recaptchalib.php');
$privatekey = "xXxXxXxXxXxXxXxXx";
$response = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it
again." .
"(reCAPTCHA said: " . $resp->error . ")");
}
?>
__________________________________________________________
I asked the author of the mail form to implement reCAPTCHA himself
into the form.
I got the form working, but the problem is reCAPTCHA.
The problem are the 2 php files above. They wont work and i dont know
why.
Its the basic code from the reCAP site.
It should work but it doesnt.
HELP!
You see the form in Contact section. It all works exept reCaptcha.
Without the check it works and sends mail.
My test showed the form is ok and the validation of reCAPTCHA goes
wrong.
It was a stupid misstake in verify.php.
"resp" needs to be "response" in the script.