Jump to content

Security Code Generator


jpickeri

Recommended Posts

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!

Link to comment
Share on other sites

Since the page you pointed to is part of the Invision Board script, you could download a free copy for yourself and borrow the part with the security code. That would be a fast solution.

 

If you are going to build one from scratch that puts up one of those 'ransom note' looking random codes then you'll probably need an image file for each character (letter or number) that will be part of the random security code you generate.

 

Generating the random code is easy. Then you could display the images with server side language (PHP or CGI) and compare the user input with the actual string that the server created.

 

Not hard, but a lot of work to get those images together.

Link to comment
Share on other sites

Solved the problem using cgi Image::Magick. Actually quite easy once I understood how to create a basic image. Only problem I have now is how to delete the temporary image files if users leave the page without using my 'get' or 'cancel' buttons (see www.jsnmp.com/cgi-bin/download.pl ... the generated image is the security code at the bottom of the page). I am looking into the JavaScript possibilites at the moment. May have to resort to periodically running a cron job.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...