ReCaptcha integration against Spam

Ask Enigma Premium Theme Installation, Settings & Configuration, Problem, Error & Bug Related Issues Here

Moderator: forum_m

Post Reply
petbelko
Posts: 10
Joined: August 26th, 2015, 9:26 pm

ReCaptcha integration against Spam

Post by petbelko » January 26th, 2019, 11:23 pm

Dear Weblizar team,

I want integrate Google recaptcha to Enigma Pro contact form. I do everything from your mention in https://pastebin.com/A2V8g5nK
But I don’t know how integrated captcha verification in contact-us.php file.
I need paste code like this, but in which row?

Code: Select all

<?php
 
  if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response']))
  {
        $secret = 'your_actual_secret_key';
        $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$_POST['g-recaptcha-response']);
        $responseData = json_decode($verifyResponse);
        if($responseData->success)
        {
            $succMsg = 'Your contact request have submitted successfully.';
        }
        else
        {
            $errMsg = 'Robot verification failed, please try again.';
        }
   }
?>
Source of code above http://acmeextension.com/integrate-goog ... -with-php/

Or can you write here to forum correct verification code to paste in contac-us.php, please?

Thank you very much.
Peter

support_staff
Posts: 7147
Joined: February 26th, 2015, 1:40 pm

Re: ReCaptcha integration against Spam

Post by support_staff » January 28th, 2019, 10:40 am

Hi,

you can use https://wordpress.org/plugins/google-captcha/ this plugin in place of doing that code.

That's easy to use for you.

Let us know if any query.

Thanks.

petbelko
Posts: 10
Joined: August 26th, 2015, 9:26 pm

Re: ReCaptcha integration against Spam

Post by petbelko » January 28th, 2019, 6:13 pm

Hi,

Sorry, your suggested solution not working in contact us (email) form in Enigma Pro theme. I can send message if recaptcha is not checked – it is without verification.
That plugin works only for WordPress default - Login form, Registration form, Reset password form, Comments form.

Do you have please, functional solution against spam in your Enigma Pro theme contact form (contact-us.php) or I must use another contact form plugin and avoid use contact-us.php page template?

Thank you very much.
Peter

support_staff
Posts: 7147
Joined: February 26th, 2015, 1:40 pm

Re: ReCaptcha integration against Spam

Post by support_staff » January 29th, 2019, 10:22 am

Hi,

Yes, we will solve your issue.

For this, we need your site temp access. So Please send your site temp access at our email id which is lizarweb@gmail.com

Thanks.

petbelko
Posts: 10
Joined: August 26th, 2015, 9:26 pm

Re: ReCaptcha integration against Spam

Post by petbelko » February 4th, 2019, 2:56 am

Hi,
I want to ask if you found an antispam solution, please?
It will be in next update of theme?
Thank you.
Peter

support_staff
Posts: 7147
Joined: February 26th, 2015, 1:40 pm

Re: ReCaptcha integration against Spam

Post by support_staff » February 4th, 2019, 11:28 am

Yes. if fount then, we will update this in our next update.

Thanks.

Post Reply

Return to “Theme Installation, Settings & Configuration, Problem, Error & Bug”