Solved

image word verification

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

729 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