?
Solved

image word verification

Posted on 2004-04-21
3
Medium Priority
?
621 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

752 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