Re: Re: Codigo de Captcha en PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, August 14, 2006 3:32 am, Julio B. wrote:
> Hay muchos y muy variados en Internet. En alguna ocasión he usado el
> que
> viene en sBlog. Es muy sencillo de implementar y para la mayoría de
> los
> casos suficiente para evitarnos problemas de spam.
>
> En código es:
>
> <?php
>
>  $key = (array_key_exists('k', $_GET) && strlen($_GET['k']) == 4) ?
> $_GET['k'] : strtolower(substr(md5(rand()), 0, 4));
>
>  $im = imagecreatetruecolor(40, 20);
>
>  $bg = imagecolorallocate($im, 0, 0, 0);
>  $col_text = imagecolorallocate($im, 255, 255, 255);
>
>  imagestring($im, 4, 4, 1, $key, $col_text);
>
>  header('Content-type: image/png');
>  imagepng($im);
>  imagedestroy($im);
>
> ?>

I can't read Spanish and am probably not answering your question, but
if you are passing in ?k=ABCD and the image just contains ABCD, then
the Bad Guy only has to see the URL and figure out how to get ABCD to
break your CAPTCHA...

Here is a very crude minimalistic example CAPTCHA implementation that
you may find useful:
http://voodookings.net/eyesonly_example.htm

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux