Simple captcha for an ASP page

Discussion in 'C#' started by pratik, Mar 28, 2010.

  1. #1
    hi there,

    I am working on a website which was designed and developed by some other designer.
    The website contains a simple enquiry page with lots of text fields. And as usual the client is getting lots of spam from it :)
    Is there a way to add simple captcha or some kind of human verification to the form without much of coding? The main purpose is to stop spam.:confused:
     
    pratik, Mar 28, 2010 IP
  2. JimBeam451

    JimBeam451 Guest

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could try adding something like a quick math puzzle that displays random numbers and asks for a result
     
    JimBeam451, Apr 3, 2010 IP
    pratik likes this.
  3. pratik

    pratik Notable Member

    Messages:
    2,306
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #3
    Yup this would be nice....but now can I rotate the questions with there respective answers... :confused:
     
    pratik, Apr 5, 2010 IP
  4. aurelius7

    aurelius7 Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try this: www dot tipstricks dot org
     
    aurelius7, Apr 14, 2010 IP
  5. pratik

    pratik Notable Member

    Messages:
    2,306
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #5
    This is what I am looking at.
    I have downloaded the Number one. But there are no instructions to get it running?

    Can you help!
     
    pratik, Apr 16, 2010 IP
  6. lazystream

    lazystream Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    a quick and easy way to make a captcha is create a new bitmap based on a variable hidden in the pages session.

    Session["capchacode"] = new random().Next(1,99999);

    string captchacode = (string)Session["capchacode"];


    now generate an image and display the string of random stuff


    then just do a... if text entereed == captchacode
     
    lazystream, Apr 16, 2010 IP
  7. bibinsmk

    bibinsmk Active Member

    Messages:
    205
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #7
    You can use the Random() function for generate two random numbers.
     
    bibinsmk, Apr 16, 2010 IP
  8. Thomasan

    Thomasan Active Member

    Messages:
    310
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #8
    Thanks for sharing information..
     
    Thomasan, Apr 22, 2010 IP
  9. aurelius7

    aurelius7 Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Unpack captcha.asp somwhere in your application.
    You can show captcha image in your application: <img id="imgCaptcha" src="captcha.asp" />
    This will set session("ASPCAPTCHA") to value from picture.
    Then you can simply test if value from some input field is equal to session("ASPCAPTCHA")
    Sample is in test.asp

    View attachment captcha.asp
    View attachment test.asp
     
    aurelius7, Apr 23, 2010 IP
  10. andrewdavid

    andrewdavid Peon

    Messages:
    98
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    The best solution to add a captcha on your website is to use a built in API available for CAPTCHA over the internet. Please write and search on google about captcha in the technology you want to search out. I am working as a developer from last 2 years implemented the same mechanism for our websites to prevent from spam entries..

    Regards
     
    andrewdavid, Apr 23, 2010 IP