Ver Mensaje Individual
  #8 (permalink)  
Antiguo 22/04/2008, 02:20
Avatar de jerkan
jerkan
 
Fecha de Ingreso: septiembre-2005
Mensajes: 1.607
Antigüedad: 18 años, 7 meses
Puntos: 19
Re: Emails anti-SPAM

Cita:
Iniciado por paulkees Ver Mensaje
Hola jerkan...

Puse en el <body> el codigo:

Código PHP:
$_GET['texto'] = "[email protected]"## Email que queremos proteger
$length strlen($_GET['texto']) * 6;
header("Content-type: image/png");
$im imagecreate($length14);
imagecolorallocatealpha($im25500127);
$color imagecolorallocate($im000);
imagestring($im200$_GET['texto'], $color);
imagepng($im);
imagedestroy($im); 
Lo llamé en la forma como dices, sacándole:

Código PHP:
$_GET['texto'] = "[email protected]"
y la pagina me queda en blanco!

Saludos.-
En tu página principal pon esto:
Código PHP:
<img src="email.php" /> 
entonces, en email.php tienes que poner esto:
Código PHP:
$_GET['texto'] = "[email protected]"## Email que queremos proteger
$length strlen($_GET['texto']) * 6;
header("Content-type: image/png");
$im imagecreate($length14);
imagecolorallocatealpha($im25500127);
$color imagecolorallocate($im000);
imagestring($im200$_GET['texto'], $color);
imagepng($im);
imagedestroy($im); 
Si quitas el $_GET['texto'], la función strlen tendrá un parametro vacío. Si no te funciona, comenta la linea
Código PHP:
header("Content-type: image/png"); 
y carga el script email.php en tu navegador para ver posibles errores.