si, me registre, tengo la clave privada y la publica, coloque en el servidor el recaptchalib.php. pero no se linkea con mi formulario, se comporta de manera separada: Me explicare de forma mas exetndidad.
yo primeramente ya habia terminado de hacer mi página de contacto en html, el cua se llamaba (CONTACTO.HTML) este ya formulario ya estaba validado y finalizado.- Quiero aclarar que este formulario en html, mandaba a llamar a un fichero .php para que ejecutara el formulario, osea mi formulario html tenia un "ACTION= ACTION.PHP"
Luego, me propuse insertar el "recaptcha" en mi formulario que ya estaba hecho en html. Pero observe que en html no funcionaba, asi que seleccione todo el .html y lo guarde en .PHP.
Ahora tengo el nuevo formuario extraido del html, y se llama "CONTACTO.PHP" el cual ya estaba validado desde que era html, tiene las propiedades del "recaptcha" dentro de este php. Y tambien tiene en el action del formulario "ACTION.PHP"
en conclusion mi formulario nuevo en php es =
Código PHP:
<form action=php/ACTION.PHP id=contactForm method=post name=contactForm>
<label for=name_first>Nombre:</label>
<input class="text required" id=nombre name=nombre value="" />
<label for=name_last>Empresa:</label>
<input class=text id=empresa name=empresa value="" />
<label for=email>E-mail:</label>
<input class="text required email" id=correo name=correo value="" />
<label for=phone>Teléfono:</label>
<input class="text required" id=telefono name=telefono value="" />
<label for=name_last>Pais:</label>
<input class="text required" id=pais name=pais value="" />
<label for=description></label>
<label><textarea class=required cols=30 id=mensaje name=mensaje rows=2></textarea></label>
<fieldset class=submit>
<?php
require_once('recaptchalib.php');
// Get a key from http://recaptcha.net/api/getkey
$publickey = "*************************";
$privatekey = "*************************";
# the response from reCAPTCHA
$resp = null;
# the error code from reCAPTCHA, if any
$error = null;
# was there a reCAPTCHA response?
if ($_POST["recaptcha_response_field"]) {
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if ($resp->is_valid) {
echo "You got it!";
} else {
# set the error code so that we can display it
$error = $resp->error;
}
}
echo recaptcha_get_html($publickey, $error);
?>
<input align=right class=submit name=submit type=submit value=Enviar /> //// (este submit ya esta validado y se conecta con ACTION=ACTION.PHP
</form>