Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    I would suggest that you double check:

    • your keys,
    • that the keys entered don’t have any trailing whitespace,
    • that you haven’t inadvertently switched the keys (i.e. site/secret aren’t switched)
    • that your keys are for the domain you are using it on

    Also, to be clear, keys need to be entered in the WP-Members Captcha tab.

    Thread Starter betagoo

    (@betagoo)

    Some servers not support file_get_contents function (security reasons).
    Solution to resolve this problem below.

    Edit file register.php
    Comment line 211
    Above line 211 paste this code:

    function captcha_curl_load( $url )
    {
    curl_setopt($ch=curl_init(), CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($ch);
    curl_close($ch);
    return $response;
    }
    
    $url = "https://www.google.com/recaptcha/api/siteverify?secret=" . $privatekey . "&response=" . $captcha . "&remoteip=" . $_SERVER['REMOTE_ADDR'];
    
    $response = captcha_curl_load( $url );
    Thread Starter betagoo

    (@betagoo)

    Perhaps You change verify recaptcha key method to curl into wp-members script on the occasion another update?

    Plugin Author Chad Butler

    (@cbutlerjr)

    Using cURL is actually not the ideal solution – it basically replaces one problem with another since, like file_get_contents(), not every server has this enabled (see this thread for a more detailed explanation).

    The better solution is using wp_remote_fopen() which is now implemented in version 3.1.4.2.

    Thread Starter betagoo

    (@betagoo)

    Great. Works.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘reCaptcha2 not work’ is closed to new replies.