I am hoping to mimic the link with CGI and perl. What I have found is either the GD or Image::Magick interfaces. Both installed on TCH!
Initial logic has me generating a random number sequence, annotating an image with it, putting the image in the web page via cgi, encoding the random number and using it as a variable to the form, and comparing the encoded number with what the user enters. Easy enough!