• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

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