I have been to some sites where you have to type in a code or password that appears as a graphic. I believe it is done to prevent SPAM or attacks to the site.
How can I add this to my site? [B]is there a script that creates these graphical passwords?[/B]
@JPnycSep 09.2005 — #Scripts can't generate images. Those are images you're seeing. You have to create those yourself. The script can bring them up at random, but it can't make them
can you direct me in the right direction on how I can find the script or maybe purchase it? I assume the script also has to somehow authenicate or check the entered password with the graphical displayed password.
@bathurst_guySep 09.2005 — #Scripts can't generate images. Those are images you're seeing. You have to create those yourself. The script can bring them up at random, but it can't make them[/QUOTE] php can do it, but i cant remember how atm, there was a post on this a little while ago
@JPnycSep 09.2005 — #Finding one, I dunno. I would try all the major search engines. I've never written one of these but I have a good idea how it would be done. In fact it could be done clientside with Javascript. You'd place all the image file names into an array and use randomImageFile=Math.floor(Math.random()*totalNumberOfImagesHere) to pull them at random.
You'd need to create the image files 1st, then I would name the files the same as the contained password. Example: if the image shows 4RTMJ, name that pic file 4RTMJ.gif (or jpg, whatever). Then all you'd have to do is compare the contents of the text field with the file name held in your array index (the one that came up that time), and strip off the suffix.
@bokehSep 09.2005 — #Bathurst pointed me here. It is called capcha verification. Do a search on google. PHP can create the images without a problem. Go and read up first and see if it is for you though. Also consider how this effects blind people. For them you should offer an audio version of the image.
@bokehSep 09.2005 — #If you do it client side (javascript) it is easy to bypass. I am going to write a script now to do this. I need time to think about it though.
@bokehSep 09.2005 — #This has been done with Perl in the past using the Perl gd library or with an interface to the GIMP API.[/QUOTE]Sometimes it's writing it that is the challenge!
[B]Edited to simplify the code[/B] [code=php]<?php session_start();
@JPnycSep 09.2005 — #You don't have to know it, he wrote it for you. All you need to know is if your host supports PHP. If it does, just call the script file onclick like any other file.
@bokehSep 09.2005 — #If you didn't want a PHP solution why did you ask your question in the PHP forum? Well maybe someone else will find this working solution of some use. By th way once you've written your ASP solution would you come back and post it here as I would be interested to see it.
@bokehSep 09.2005 — #Why has this script been kidnapped from the PHP forum? It is a PHP question and the solution will be wasted if it is not left in the PHP forum.