• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

reCaptcha integration in contact.php

Status
Not open for further replies.

Wal

Chevereto Member
Hey guys,

I wanted to integrate reCaptcha in contact.php, but it doesn't work.
I uploaded recaptchalib.php to content/themes/Peafowl/pages so the captcha can work.
I noticed the $_POST (in contact.php) which is at the beginning of the file and the <form> in the end of it.
So I coded this for the form :
PHP:
require_once('recaptchalib.php');
$publickey = "PublicKey";
echo recaptcha_get_html($publickey);
Where PublicKey = the publickey of my website and this for the data "recovery" :
PHP:
require_once('recaptchalib.php');
$privatekey = "PrivateKey";
$resp = recaptcha_check_answer (
$privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]
);
Where PrivateKey = the privatekey of my website

The captcha loads but I still can send an e-mail without filling it, so I don't know...
If someone could help me, it would be cool !
 
You need to write a conditional for when the challenge fail. That is all your code?
 
Status
Not open for further replies.
Back
Top