[pmwiki-users] Experimental captcha recipe
Henrik
henrik.bechmann at sympatico.ca
Mon May 7 16:26:12 CDT 2007
For the naive code generator, the easiest thing would be to leave out
vowels.
Patrick R. Michaud wrote:
> On Mon, May 07, 2007 at 04:43:18PM -0400, Jason Frisvold wrote:
>
>> On 5/7/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>>
>>> For sites that don't have PHP image libraries available, the
>>> {$Captcha} markup displays the challenge value as plain text
>>> instead of an image. It's also configurable, which means that
>>> it will be possible to plug in other obscuration methods
>>> if plain text or the captcha image generator I'm using aren't
>>> sophisticated enough.
>>>
>> Very nice.. Is the length of the captcha configurable? It looks like
>> you're using a length of 4 characters right now (which all seem to be
>> numbers.. no letters?)
>>
>
> The value defaults to a random number between 1000 and 9999.
> A site administrator can choose any value for the captcha
> challenge. For example, a 5-digit code could be:
>
> $CaptchaValue = rand(10000,99999);
>
> The value isn't limited to digits -- a site administrator can use any
> valid (non-space) ASCII characters. For example, a naive code
> generator might be:
>
> function rchar() {
> return substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', rand(0, 36), 1);
> }
> $CaptchaValue = rchar().rchar().rchar().rchar().rchar();
>
> This is a "naive generator" because it could generate values that
> are inadvertently offensive to some. Coming up with a "safe"
> generator is a bit more work (but I'll be glad to provide one if
> someone will research the algorithms a bit).
>
>
>> Are you planning on adding any additional obfuscation methods, or is
>> that left as an exercise to the reader? :)
>>
>
> If anyone wants to suggest other obfuscation methods, I'm very
> open to them.
>
> Pm
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
>
--
Henrik Bechmann
www.bechmann.ca
Webmaster, www.dufferinpark.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070507/15e94d5c/attachment.html
More information about the pmwiki-users
mailing list