Solved

image word verification

Posted on 2004-04-21
3
605 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now