jpickeri Posted September 12, 2003 Share Posted September 12, 2003 I would like to use a security code feature similar to the signup page (http://www.totalchoicehosting.com/forums/index.php?act=Reg&CODE=00). Any clues or pointers? Quote Link to comment Share on other sites More sharing options...
jpickeri Posted September 12, 2003 Author Share Posted September 12, 2003 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! Quote Link to comment Share on other sites More sharing options...
surefire Posted September 14, 2003 Share Posted September 14, 2003 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. Quote Link to comment Share on other sites More sharing options...
jpickeri Posted September 15, 2003 Author Share Posted September 15, 2003 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. Quote Link to comment Share on other sites More sharing options...
xGrendel Posted September 16, 2003 Share Posted September 16, 2003 What about using a session cookie? Don't ask me how it would work, but I know that is how alot of providers use the images - person navigates away or closes the browser and poof! image is gone..... Quote Link to comment Share on other sites More sharing options...
xGrendel Posted September 16, 2003 Share Posted September 16, 2003 dupe post - disregard Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.