
Originally Posted by
bigbird324
Just sharing something i setup to help combat the spammers from china i have been dealing with.
I did two things first i added this code to the end of my header.inc.php
$fp = fopen("ips.txt", "a");
fputs($fp, "IP: $v_ip - DATE: $v_date\n\n");
fclose($fp);
you need to ad it before the end of all commands
second i created a simple .txt file called ips.txt and uploaded it to me root folder
now you can typ in mysite.com/ips.txt and it will list all ip's that have come to your site.
Then i just used a ip tracker to determine where the ips were and compared it to when the spammers logged in and then added their ip code to my .htaccess file with some coding to block it like this
order allow,deny
deny from 0.0.0.0
allow from all
this is a little bit of a crude method but it works.
you can type in just the first two numbers of the ip addy as well and it will block all ip's that start with those numbers so that you can block almost an entire counrty with the first two numbers
I have not tested this on D7 but it is supposed to have something like this built in with the next release
Bookmarks