Re: WebDNA CAPTCHA

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 69757
interpreted = N
texte = I put together a captcha that uses WebDNA and Imagemagick. (1) Use WebDNA to generate a random string like so: [text ]Pattern =1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[/text] [text]RandomString=[/text] [loop start=1&end=5&advance=1] [text]nextchar=[math]ceil([RANDOM format=float]*62)[/math]=[/text] [text]RandomString=[RandomString][GetChars start=[nextchar]&end=[nextchar]][Pattern][/GetChars][/text] [/loop] (2) Write the solution [RandomString] to a file. (3) use Imagemagick to put our [RandomString] onto a background image (background.gif) that we have already set up for this purpose like so: [shell]/usr/local/bin/convert -size 180x65 xc:white -tile captcha/ background.gif -draw "color 0,0 reset" -draw "font '/Library/Fonts/ Verdana' font-size 42 fill white stroke black stroke-width 2 translate 10,45 text 0,0 '[RandomString]'" 'captcha/text.png'[/shell] (4) Insert your image "captcha/text.png" into your form. (5) When the user submits their form compare their answer to the solution you saved in the text file in step 2. (6) Drink champagne :-) Phil Ronchetti ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: WebDNA CAPTCHA ( Stuart Tremain 2008)
  2. Re: WebDNA CAPTCHA ( Donovan Brooke 2008)
  3. Re: WebDNA CAPTCHA ( Phil Ronchetti 2008)
  4. Re: WebDNA CAPTCHA ( Frank Nordberg 2008)
  5. Re: WebDNA CAPTCHA ( Lester 2008)
  6. Re: WebDNA CAPTCHA ( Gil Poulsen 2008)
  7. Re: WebDNA CAPTCHA ( "Dan Strong" 2008)
  8. Re: WebDNA CAPTCHA ( Matthew A Perosi 2008)
  9. Re: WebDNA CAPTCHA ( Donovan Brooke 2008)
  10. Re: WebDNA CAPTCHA ( "Dan Strong" 2008)
  11. Re: WebDNA CAPTCHA ( "Olin Lagon" 2008)
  12. Re: WebDNA CAPTCHA ( "Dan Strong" 2008)
  13. Re: WebDNA CAPTCHA ( Donovan Brooke 2008)
  14. Re: WebDNA CAPTCHA ( Stuart Tremain 2008)
  15. Re: WebDNA CAPTCHA ( Donovan Brooke 2008)
  16. Re: WebDNA CAPTCHA ( Lester 2008)
  17. Re: WebDNA CAPTCHA ( Lester 2008)
  18. WebDNA CAPTCHA ( Donovan Brooke 2008)
I put together a captcha that uses WebDNA and Imagemagick. (1) Use WebDNA to generate a random string like so: [text ]Pattern =1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[/text] [text]RandomString=[/text] [loop start=1&end=5&advance=1] [text]nextchar=[math]ceil([RANDOM format=float]*62)[/math]=[/text] [text]RandomString=[RandomString][GetChars start=[nextchar]&end=[nextchar]][Pattern][/GetChars][/text] [/loop] (2) Write the solution [RandomString] to a file. (3) use Imagemagick to put our [RandomString] onto a background image (background.gif) that we have already set up for this purpose like so: [shell]/usr/local/bin/convert -size 180x65 xc:white -tile captcha/ background.gif -draw "color 0,0 reset" -draw "font '/Library/Fonts/ Verdana' font-size 42 fill white stroke black stroke-width 2 translate 10,45 text 0,0 '[RandomString]'" 'captcha/text.png'[/shell] (4) Insert your image "captcha/text.png" into your form. (5) When the user submits their form compare their answer to the solution you saved in the text file in step 2. (6) Drink champagne :-) Phil Ronchetti ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Phil Ronchetti

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCat2b15MacPlugin - [protect] (1997) [showif]/[hideif] question (1997) Country & Ship-to address & other fields ? (1997) Help! WebCat2 bug (1997) AccountAuthorizer doesn't seem to work (1997) Tax Rates returns only 0.00 (2000) Corrupted filetypes with [movefile] (1998) Grepping text variable tags (was: No subject given) (2000) [WriteFile] problems (1997) [WebDNA] Sorry WebDNA server not running (2015) taxTotal, too (1997) what run level should S90WebCatalog be at? (2003) Protect (1997) [OT] Industry standard for missing orders (2003) How to verify email address (1997) WebCat2.0 [format thousands .0f] no go (1997) rename a file (1997) Searching for (field1 OR field2) AND field3 (2000) Encryption of E-mail (1998) tag request (1999)