Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/11/2009, 06:13
poshobelloxd
 
Fecha de Ingreso: marzo-2009
Mensajes: 25
Antigüedad: 15 años
Puntos: 0
Respuesta: Problemas Imagen De Verificacion (Captcha)

Cita:
Iniciado por maycolalvarez Ver Mensaje
depende del captcha que estés usando, el almacena el hash del valor correcto o en una variable de sesion en el server o en algún registro de base de datos, con ella es que puedes hacer la verificación, tendrias que consultar el api del captcha
Este es el captcha que estoy usando

Código PHP:
<?php
session_start
();

// generate 5 digit random number
$rand rand(1000099999);

// create the hash for the random number and put it in the session
$_SESSION['image_login_value'] = md5($rand);

// create the image
$image imagecreate(5020);

// use white as the background image
$bgColor imagecolorallocate ($image000);

// the text color is black
$textColor imagecolorallocate ($image255255255);

// write the random number
imagestring ($image452$rand$textColor);

// send several headers to make sure the image is not cached
// taken directly from the PHP Manual

// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// always modified
header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0"false);

// HTTP/1.0
header("Pragma: no-cache");


// send the content type header so the image is displayed properly
header('Content-type: image/gif');

// send the image to the browser
imagejpeg($image);

// destroy the image to free up the memory
imagedestroy($image);
?>
De Atemano gracias por contestar.