Solved

image word verification

Posted on 2004-04-21
3
613 Views
Last Modified: 2008-03-03
Could someone recommend a guide on how to setup a word verification to go along with a login, it would be very much appreciated.
0
Comment
Question by:sgeye
3 Comments
 
LVL 1

Expert Comment

by:keith_dude
ID: 10883186
Could you elaborate a bit?   What do you mean by "word verification"?

Are you asking if the user's password is correct according to the password stored in the database?
0
 
LVL 6

Accepted Solution

by:
Lord_McFly earned 50 total points
ID: 10885187
I think I know what you mean - something like a small string of random letter / numbers and the user needs to enter what is there - if thats what you are after - I did this little ditty....

The code...
==========================================================
<%
Randomize Timer

Dim sControl
Dim iNoChars, iToInclude, iUpper, iRanNo

sControl = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
iNoChars = 5
sCharList = ""
iUpper = Len(sControl)
iToInclude = 0

Do While iToInclude < iNoChars 'Number of records to get...
      'This generate the random numbers...
    iRanNo = iUpper + 2
    Do While iRanNo > iUpper
        iRanNo = 1 + Int(Rnd() * (iUpper + 1 - 1))
    Loop

    'Checks for record no. in ad string...
    If Instr(1,sCharList,Mid(sControl,iRanNo,1)) = False then
            'Adds generated record no. against check string (no dups)...
            sCharList = sCharList & Mid(sControl,iRanNo,1)
            iToInclude = iToInclude + 1
    End If
Loop

Response.Write sCharList & "<br>"

For iLp = 1 to iToInclude
      Response.Write "<img src='char_" & Mid(sCharList,iLp,1) & ".gif'>"
Next
%>
==========================================================

Sample Output
=====================
PK0Bg
3TUZE
06Tcu
YuBpA
GqrC2
B8pzy
4NWti
KVQzF
j1aTG
yJuWs
plWSX
pnz41
30aXF
MTFNV
hquC1
zP3cs
xAJto
0nmSV
GkhWC
8BTW3
38pUz
u1VI9
9pQmT
WfEj6
7apir
=====================



The Response.Write bit at the end does thew following - thats if you use images for your characters....

<img src='char_B.gif'>
<img src='char_Y.gif'>
<img src='char_h.gif'>
<img src='char_t.gif'>
<img src='char_A.gif'>
0
 

Author Comment

by:sgeye
ID: 10888559
Even better than a guide, Thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JSON error 4 71
PDF Embed pdfobject.js local path problem regular ASP 2 181
Hide row when retrieving data from database 6 69
key press alert 2 32
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question