Hi All,
I'm having a problem using Captchas. Basically I'm using Joshua
Houle's script to generate Captchas. However, I get different
behaviors on different systems. On one system I can simply refresh
the page and a different Captcha is generated each time. However, on
another system, a refresh simply makes it generate the exact same
Capthca with a different visible length. For instance, it will
always generate length-wise variants
"UPGR5MB". . ."UPGR". . ."UPGR5M". . ."UPG". . ."UPGR5". The only
way it will change is if I quit my browser and open another. Also,
despite the code directive, it always generates a string length of
about 20 characters despite the code explicitly stating a random
length between 4 and 7. One interesting note, however, is that it
does change the color and position of the letters upon refresh.
I would assume that part of the problem would be with $_SESSION, as
when I "unset" it, new Captchas are generated. This, however, is
unacceptable as I need certain $_SESSION variables later. Currently
I'm using the following to solve the 20 character length issue:
$_SESSION['captchastr'] = substr($captchastr,0,$strlength); //
$strlength being the $strlength used to generate the length of
$captchastr at the beginning of the script
instead of the default code. Any ideas regarding what the differences
between servers could be would certainly be appreciated.
Regards,
Michael
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php