« Having a great time | Main | Dutch handicap »
June 20, 2006
Server name not in referer ~ Perl stuff
How to distinguish comment and/or email spam from the real thing:
#!/usr/bin/perl
use strict;
use CGI qw( :standard );
my $server_name = server_name();
my $referer = referer();
my $is_spam = $referer !~ /$server_name/;

Posted at 5:06 PM
Trackback Pings
TrackBack URL for this entry:
http://www.kiffinsblog.com/cgi-bin/mt/mt-tb.cgi/300
2 Comment(s)
The Referer field can be changed to anything you like, so the "security" isn't there.
Posted by Arjen
at June 20, 2006 8:58 PM
True, but for this case it seems to work very well. Not all spammers are as knowledgable as you.
Posted by kiffin
at June 20, 2006 9:02 PM
Post a comment
Thanks for signing in, . Now you can comment. (sign out)
(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)







