1
PeeCee
Re: Stop Comment-Spam and Email-Harvesting
  • 2008/6/23 15:44

  • PeeCee

  • Just popping in

  • Posts: 5

  • Since: 2008/6/9 1


right now i use this:
include 'httpbl.php';
$h=new http_bl('abcdefghi');              // put your access key here
$ip=$_SERVER['REMOTE_ADDR'];       // replace with the ip to query
$r=$h->query($ip);
if(
$r>=2){
   if (
$h->score>20){
                echo (
"This IP is reported as a known Spammer. Please refer to http://www.projecthoneypot.org to change your status.<br>");
                die ( 
"Found a " $h->type_txt ." (".$h->type_num .") with a score of "$h->score ", last seen since "$h->days " days");
        }
}


You must register to projecthoneypot.org for a valid api-key. Replace abcdefghi with that key.

I came up with the idea, since drupal, phpbb, Wordpress and even MediaWiki already have modules.



2
PeeCee
Re: Stop Comment-Spam and Email-Harvesting
  • 2008/6/11 9:53

  • PeeCee

  • Just popping in

  • Posts: 5

  • Since: 2008/6/9 1


I yust found out the hard way, that it is absolutely neccessary to include the "thread-level"/score in the if-statement. found IPs are never deleted, only their thread level is lowered to zero eventually. So you must check $h->score.



3
PeeCee
Re: Stop Comment-Spam and Email-Harvesting
  • 2008/6/11 6:03

  • PeeCee

  • Just popping in

  • Posts: 5

  • Since: 2008/6/9 1


No, its not the password, its the api-key you get on this page after you register.



4
PeeCee
Stop Comment-Spam and Email-Harvesting
  • 2008/6/10 6:32

  • PeeCee

  • Just popping in

  • Posts: 5

  • Since: 2008/6/9 1


I finally got tired of removing comment spam.
I registered for a free Account onhttp://www.projecthoneypot.org.

Then I downloaded this class:
http://projecthoneypot.org/board/read.php?f=10&i=179&t=179

and added this code to mainfile.php
include 'httpbl.php';
 
$h=new http_bl('*********'); // No, i will not post my Key here.
        
$ip=$_SERVER['REMOTE_ADDR']; 
        
$r=$h->query($ip);

        if(
$r>=2){
                echo (
"This IP is reported as a known Spammer. Please refer to http://www.projecthoneypot.org to change your status.<br>");
                die ( 
"Found a " $h->type_txt ." (".$h->type_num .") with a score of "$h->score ", last seen since "$h->days " days");
        }
}


I got no more spam from that day.




TopTop



Login

Who's Online

222 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 222


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits