Go Back   Cloud Computing > General Discussion > General Discussion Forum
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 01-29-08, 15:45
BOD Member
 
Join Date: Jan 2008
Location: NYC
Posts: 94
Default Absurdly simple anti-spam script...

...but will it work? It's so simple I'm embarrassed to post it, but here's what I did.

Here's a contact page here.

The visitor picks a random four digit number ($randnum).

A few fields later, they are asked to add seven to it ($haha).

The script pops an alert and exits if $haha doesn't equal $randnum + seven:

PHP Code:
if ($haha != ($randnum 7))
{
echo 
"
    <script type='text/javascript'>
        alert('WRONG ANSWER! USE THE BACK BUTTON TO TRY AGAIN.');
    </script>
    "
;
exit;


This is placed before the mail processing section.

I mean, seriously, could something this stupid actually work?

Best,

Richard
Reply With Quote
  #2 (permalink)  
Old 01-29-08, 15:55
BOD Member
 
Join Date: Jan 2008
Location: NYC
Posts: 94
Default

Or, if you have a landing page named "error.html" for failed validation attempts...

PHP Code:
}
$validationOK=true;
// get rest of variables first and validate them, then add
if ($haha != ($randnum 7)) $validationOK=false;
if (!
$validationOK) {
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
  exit;

Richard
Reply With Quote
  #3 (permalink)  
Old 03-19-08, 04:16
sam sam is offline
BOD Member
 
Join Date: Jul 2007
Posts: 141
Send a message via Yahoo to sam
Default

When a spammer's program visits your websites page, it will check every pages that you link to for email addresses. So to avoid these all you have to do is link to this page so that whenever a spammer's program scans your page, they will be confused into this one.

To link to this page, just use this simple code:

HTML Code:
 Fight Spam! Click Here!
Reply With Quote
  #4 (permalink)  
Old 03-20-08, 04:04
BOD Member
 
Join Date: Nov 2005
Posts: 206
Default

One of the best way to prevent automated web robot tools and spammers from taking advantage of your forms and scripts is by using a captcha image.
Reply With Quote
  #5 (permalink)  
Old 03-20-08, 07:05
BOD Member
 
Join Date: Jan 2008
Location: NYC
Posts: 94
Default

I don't care much for captcha images. Robots can be programmed with OCR capabilities, and the captchas have to get so hard-to-read that humans also have problems with them.

I'm building a site that incorporates code based on what I described here (Fairly decent spam-stopper form) that eliminates the need for captcha images, and in fact uses the concept as a honeypot to trap bots.

Best,

Richard
Reply With Quote
  #6 (permalink)  
Old 03-21-08, 04:10
BOD Member
 
Join Date: Nov 2005
Posts: 206
Default

I think captcha is a completely automatic public Turing test to tell computers and humans apart—is a test that humans can pass but computer programs cannot; such tests are becoming key to defending e-commerce systems. By using a Captcha, for example, IT systems can permit only real people—rather than a spammer's script—to create a free e-mail account.
And I think it's not very hard to read that captcha.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 11:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.