Foros del Web » Programando para Internet » PHP »

[SOLUCIONADO] Error con sistema captcha

Estas en el tema de Error con sistema captcha en el foro de PHP en Foros del Web. No entiendo esto, necesito ayuda, el sistema reconoce la llave privada y marca error, todo funciona bien, exepto la imagen que no se ve la ...
  #1 (permalink)  
Antiguo 21/03/2014, 22:14
 
Fecha de Ingreso: febrero-2014
Mensajes: 31
Antigüedad: 10 años, 2 meses
Puntos: 0
Error con sistema captcha

No entiendo esto, necesito ayuda, el sistema reconoce la llave privada y marca error, todo funciona bien, exepto la imagen que no se ve la estoy generando con lo siguiente:

Aparece un error de google es el siguiente:

An error occurred:
An internal error occurred: 4F52A4511AB20.A80928D.BD7

¿Qué estoy haciendo mal?

Código PHP:
<h3>
<
label for="bean_captcha" class="registration-text">Teclea el código de seguridad que aparece en la imagen</label>
</
h3>

<
div id="captcha-code-error"></div>

<
p></p>

<
div class="register-label" id="recaptcha-reload">
    <
p>
        <
img src="https://www.habbo.es/v2/images/shared_icons/reload_icon.gif" width="15" height="15" alt="">
        <
a id="recaptcha-reload-link" href="#">Intenta con palabras diferentes</a>
    </
p>
</
div>

<
script type="text/javascript">
document.observe("dom:loaded", function() {
    
Event.observe($("recaptcha-reload"), "click", function(e) {Event.stop(e); Utils.reloadRecaptcha()});
    
Utils.showRecaptcha("recaptcha_challenge""6Le-aQoAAAAAABnHRzXH_W-9-vx4B8oSP3_L5tb0");
});
</script>

<div id="recaptcha_challenge" class=" recaptcha_nothad_incorrect_sol recaptcha_isnot_showing_audio">
  <div id="recaptcha_image" style="width: 300px; height: 57px; "><img style="display:block;" height="57" width="300" src="https://www.google.com/recaptcha/api/image?c=03AHJ_VutfS2qYQyHyu42SMNwhMSFDiSsV-jdmOxjtOCggAYtvgZlyVVUT1Dfks4hGvT_jiiGKcF6aYTm6B9gpUj1xUeb80IvMGFO_BVig-yW6xC19cZc_h0bFfB05PJtpadE-NIMUDHSfdjz8bb79URfoIuaYN2N5xQ"></div>

  <p>
    <span id="recaptcha_challenge_field_holder" style="display: none; "><input type="hidden" name="recaptcha_challenge_field" id="recaptcha_challenge_field" value="03AHJ_VutfS2qYQyHyu42SMNwhMSFDiSsV-jdmOxjtOCggAYtvgZlyVVUT1Dfks4hGvT_jiiGKcF6aYTm6B9gpUj1xUeb80IvMGFO_BVig-yW6xC19cZc_h0bFfB05PJtpadE-NIMUDHSfdjz8bb79URfoIuaYN2N5xQ"></span><input type="text" name="recaptcha_response_field" id="recaptcha_response_field" value="" class="registration-text required-captcha" autocomplete="off">
  </p> 
  #2 (permalink)  
Antiguo 21/03/2014, 22:25
Avatar de loncho_rojas
Colaborador
 
Fecha de Ingreso: octubre-2008
Ubicación: En el mejor lugar del mundo
Mensajes: 2.704
Antigüedad: 15 años, 6 meses
Puntos: 175
Respuesta: Error con sistema captcha

Porque no usas el RE-captcha de google y lo implementas, es demasiado sencillo y mas efectivo.

Código PHP:
<?php

require_once('../recaptcha/recaptchalib.php');
  
$privatekey "XXXXXXXX";
  
  
$resp recaptcha_check_answer ($privatekey,
                                
$_SERVER["REMOTE_ADDR"],
                                
$_POST["recaptcha_challenge_field"],
                                
$_POST["recaptcha_response_field"]);
                                
  
// Verificamos si el codigo es correcto del captcha
  
if (!$resp->is_valid) {
    
// si es incorrecto
    
$msj"<div style='
                width:290px;
                padding:5px;
                background-color:#fabdbd;
                border: #FF0000 thin solid;
                color: #FF0000;
                font-family: Arial;
                font-size: 13px;
                text-align:center;'>Debe completar el c&oacute;digo de verificaci&oacute;n.</div>"
;
    
  } else {
    
// Vsi es correcto, enviamos el mail
    
    
aca va el cuerpo del mail
    
    
  
}//fin validacion de captcha
?>
en el cuerpo donde va a ir el Recaptcha

Código PHP:
 <?php

                            
                            
require_once('../recaptcha/recaptchalib.php');
                            
                            
                            
$publickey "XXXX";
                            
                            echo 
recaptcha_get_html($publickey$error);
?>
Por lo menos así lo uso yo
__________________
Ayudo con lo que puedo en el foro, y solo en el foro.. NO MENSAJES PRIVADOS.. NO EMAILS NI SKYPE u OTROS.

Antes de hacer un TOPICO piensa si puedes hallarlo en Google o en el Buscador del Foro...

Etiquetas: captcha, sistema
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:42.