Solved

image word verification

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP Sessions Being Cleared/Modified 6 79
Forcing form refresh - classic ASP 7 65
Auto Submit on dropdown box 3 74
Get hold of longitude and latitude in iframe string 11 45
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/…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 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