<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
For the naive code generator, the easiest thing would be to leave out
vowels.<br>
<br>
Patrick R. Michaud wrote:
<blockquote cite="mid:20070507211507.GD9279@host.pmichaud.com"
 type="cite">
  <pre wrap="">On Mon, May 07, 2007 at 04:43:18PM -0400, Jason Frisvold wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">On 5/7/07, Patrick R. Michaud <a class="moz-txt-link-rfc2396E" href="mailto:pmichaud@pobox.com">&lt;pmichaud@pobox.com&gt;</a> wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">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.
      </pre>
    </blockquote>
    <pre wrap="">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?)
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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).

  </pre>
  <blockquote type="cite">
    <pre wrap="">Are you planning on adding any additional obfuscation methods, or is
that left as an exercise to the reader?  :)
    </pre>
  </blockquote>
  <pre wrap=""><!---->
If anyone wants to suggest other obfuscation methods, I'm very
open to them.

Pm

_______________________________________________
pmwiki-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a>
<a class="moz-txt-link-freetext" href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a>
                                                  

  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 

Henrik Bechmann
<a class="moz-txt-link-abbreviated" href="http://www.bechmann.ca">www.bechmann.ca</a>
Webmaster, <a class="moz-txt-link-abbreviated" href="http://www.dufferinpark.ca">www.dufferinpark.ca</a></pre>
</body>
</html>