JRose
LOL Man
I was on the ZSO message board and found this.
Sealab2021 said:Since bots are becoming more and more frequent, I thought I would lend you guys some help ;P This is the same method I use on my forum, and it works pretty well. Anyway, what this basically does is record the IP address of every user registered, since phpBB doesn't do that by default. It's not perfect yet, so a few user logins get caught in there aswell, but apart from that, it should be fairly easy to use.
Here's what you do: grab profile.php from your server, and after the initial comment by the phpBB crew, paste this:
Code:############################## # Record Registrant IP Adress# ############################## # Because phpBB isn't smart enough to do this on its own. # Configuration $ip_postuser = $_POST['username']; $ip_ctime = time(); $ip_uip = $_SERVER['REMOTE_ADDR']; $ip_up = $_SERVER['REMOTE_PORT']; $ip_filename = 'filename.txt'; if(strlen($ip_postuser)>0) { # Check if file exists if(!file_exists($ip_filename)) { # If not, create a new blank file $handle = fopen($ip_filename,'w'); fclose($handle); } # Write to file $handle = fopen($ip_filename,'a'); $ip_str = "\n".$ip_postuser.' - '.$ip_uip.':'.$ip_up.' - '.$ip_ctime; fwrite($handle,$ip_str); fclose($handle); } ##############################
Just replace filename.txt on line 10 with the filename of your choice. Hopefully this will help rid ZSO of the bots, one IP range at a time :P Oh, and in case you haven't figured it out, just browse to the filename of the log to view it.