Script Library: 1240 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Archive version of: captcha-example.r ... version: 1 ... notchent 8-Apr-2010

Amendment note: new script || Publicly available? Yes

REBOL [
    title: "Captcha Example"
    date: 8-Apr-2010
    file: %captcha-example.r
    author:  Nick Antonaccio
    purpose: {
        A minimal example demonstrating how to use the captcha library by SOFTINNOV:
        http://softinnov.org/rebol/captcha.shtml
    }
]

write/binary %Caliban.caf read/binary http://re-bol.com/Caliban.caf
do http://re-bol.com/captcha.r

captcha/set-fonts-path %./
captcha/level: 4
write/binary %captcha.png captcha/generate
write %captcha.txt captcha/text

view center-face layout [
    image (load %captcha.png)
    text "Enter the captcha text:"
    f1: field [
        either f1/text = (read %captcha.txt) [alert "Correct"] [alert "Incorrect"]
    ] 
]