• Super User

    Problema installazione re-captcha

    Sto provando a installare re-captcha (un sistema anti-spam/anti-bot) sul mio sito... iniziando dalla pagina di registrazione ho messo questo codice sulla pagina dove l'utente inserisce i dati:

    [php]
    require_once('recaptchalib.php');
    $publickey = "la_mia_chiave"; // you got this from the signup page
    echo recaptcha_get_html($publickey);
    [/php]

    e questo sulla pagina che gestisce i dati ricevuti:

    [php]
    require_once('recaptchalib.php');
    $privatekey = "la_mia_chiave";
    $resp = recaptcha_check_answer ($privatekey,
    $_SERVER["REMOTE_ADDR"],
    $_POST["recaptcha_challenge_field"],
    $_POST["recaptcha_response_field"]);

    if (!$resp->is_valid) {
    die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
    "(reCAPTCHA said: " . $resp->error . ")");
    }
    [/php]

    il problema è che sia che l'input sia giusto che che sia sbagliato mi da lo stesso messaggio di errore: ovvero "The reCAPTCHA wasn't entered correctly". Eppure ho fatto esattamente come nel tutorial.

    Qualcuno sa aiutarmi?