Ask Experts Questions for FREE Help !
Ask
    RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #1

    Jul 25, 2006, 07:13 AM
    Stopping Bots from submitting to my Guestbook.
    I've got a guestbook entry page that is slammed by bots.

    I know there are apps to install like this, but I prefer something simpler.

    I tried form validation with Dreamweaver on this test page but it does not work. I've got validation set for the "verification" field to be a number between 12325 & 12327 but it does not work. If you enter the wrong number, you DO get an error message, but the info still comes to me via email.

    What I'd REALLY like is the slick trick at the bottom of this page:
    http://www.franklinaa.com/faa_contact-form.asp

    Any suggestions for a very simple validation trick to stop the bots?

    Thanks!
    LTheobald's Avatar
    LTheobald Posts: 1,051, Reputation: 127
    Ultra Member
     
    #2

    Jul 25, 2006, 07:37 AM
    That's very easy to do Rick. What you would need is a database containing a table called something like QandA. This table would have 3 rows - an id, a question and a correct answer. On your form you would randomly select a question from the table and display it on the page. When you submit the form you also submit the ID of the question asked. The form submits to a page where the answer is checked to see if it matches what the user posted. If it doesn't, throw back an error message. If it does, then send the email.

    I'll write you up an example in PHP later so that you can see what I mean.

    Alternatively, there are tricks like .htaccess modifications.
    RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #3

    Jul 25, 2006, 07:51 AM
    Thanks, LT. Keep in mind, though, I'm an old dog that is pretty dumb about learning new tricks.

    You say "database" and I cower in the corner.

    Whatever "trick" is the simplest for a newb will be best for me :D
    LTheobald's Avatar
    LTheobald Posts: 1,051, Reputation: 127
    Ultra Member
     
    #4

    Jul 25, 2006, 03:37 PM
    OK Rick, here's the code we need. I'll step through using it with you tomorrow but now it's time for bed! It's also not tested that well so there might be mistakes!

    Example PHP code to test:
    Code:
    <?php include("qanda.inc"); ?>
    <html>
    <head>
    <title>ABC</title>
    </head>
    
    <body>
    Hello
    <?php
    $qanda = new QandA();
    echo $qanda->getQuestion() ."<br/>";
    echo $qanda->getQuestionId() ."<br/>";
    ?>
    </body>
    </html>
    Attached Files
  1. File Type: txt qanda.txt (3.3 KB, 511 views)
  2. RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #5

    Jul 26, 2006, 03:27 AM
    I must confess my stupidity. That's all french to me. I have no php experience whatsoever.

    This being the case, do you think I'm better off using something like this, then?
    LTheobald's Avatar
    LTheobald Posts: 1,051, Reputation: 127
    Ultra Member
     
    #6

    Jul 26, 2006, 03:51 AM
    Well even with that, you will still need to write some PHP code into your web page (although not much). The internet scripts will be better than what I wrote as they would have been written up over days/weeks and not within 30 minutes before I went to bed last night :P

    I'm taking my lunch break in a mo so in about 30 minutes I'll write up the instructions and then you can decide if it's easy enough to do or not.
    RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #7

    Jul 26, 2006, 03:55 AM
    You are too kind, LT, to humor a complete boob. I will be happy to play with it a bit to see if I can figure it out.

    Knowing what I want to do; do you think the php angle is the easiest/simplest?
    LTheobald's Avatar
    LTheobald Posts: 1,051, Reputation: 127
    Ultra Member
     
    #8

    Jul 26, 2006, 04:51 AM
    I wouldn't say it's the easiest but it will be the most powerful. Quick question before I while I write the instructions - do you have access to anything on your web space like cPanel or phpMyAdmin?
    RickJ's Avatar
    RickJ Posts: 7,762, Reputation: 864
    Uber Member
     
    #9

    Jul 26, 2006, 05:01 AM
    Yes. My host is using cPanel X v2.5.0 (with a variety of scripts installable via Fantastico, but I don't see anything on the list that's designed for this use).

    I've got mySQL, but the most I've ever done with that is name a new database then install something to it... without a clue as to how any of it all works... :o
    LTheobald's Avatar
    LTheobald Posts: 1,051, Reputation: 127
    Ultra Member
     
    #10

    Jul 26, 2006, 08:34 AM
    Well my host also has cPanel so I can just do some screenshots showing you exactly what to do. Will get round to this later tonight :)

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search


Check out some similar questions!

Stopping a garnishment [ 1 Answers ]

Can a garnsihment be stopped once it has started? Or do I have to let it run its course?:confused:

Easy way to stop bots from trying to spam my guestbook? [ 10 Answers ]

OK, I know I can install something like this, but I really don't want to install anything. Check out what this guy is doing at the bottom of his page: Franklin Acquisition Advisors I love that! Anyone know how to do it? I'm using dreamweaver, and find that if I assign a value to that...

Toilet Stopping Up [ 13 Answers ]

Ok, here goes. I have a 2 story home and the bathroom on the lower level continues to back up whenever I run the dishwasher or washing machine. All three here are on the lower level. I am on a septic system, which has been "sucked" out recently. The problem seems worse in the winter and when it...

Need a Simple Guestbook Recommendation [ 3 Answers ]

I've been burned before: A site wiped out from my stupidity in not updating the script. I recently installed VIPER Guestbook: I like it's simplicity and features, but now see that it will no longer be updated... so don't want to keep it. Can anyone recommend a simple, secure Guestbook...


View more questions Search