You are not logged in.
I've made an spambot detector for use for everyone, you can use this for any registration form or anything else, it checks the IP and E-Mail, and if an match has found in the stop forum spam database it gives true.
I've also included an domain blocker, so the main domains like mail.ru can be blocked standard.
You can find an example here: (the source is included)
http://guildwarsholland.nl/phphulp/testspambot.php
Offline
Sorry I missed this, I'm trying to catch up! I'll link to your work from the downloads page.
Offline
Nice piece of PHP..
How and where do i put this into my Vbulletin forum ?
*edit*
I found it on Vbull.org.
Thanks installed..
Last edited by DOOgie (2008-09-08 7:54 pm)
Offline
DOOgie wrote:
Nice piece of PHP..
How and where do i put this into my Vbulletin forum ?
*edit*
I found it on Vbull.org.
Thanks installed..
Apart from the necro post, do you not search the forums for the native vBulletin mod?
Offline
pedigree wrote:
Apart from the necro post, do you not search the forums for the native vBulletin mod?
Sorry.. forgive my ignorance.. necro post ? and why No to searching forums.. thanks
Offline
To expand this to also check the fSpamlist database;
After;
//check the e-mail adress
$xml_string = file_get_contents('http://www.stopforumspam.com/api?email='.$mail);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spambot = true;
}elseif($spambot != true){
//e-mail not found in the database, now check the ip
$xml_string = file_get_contents('http://www.stopforumspam.com/api?ip='.$ip);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spambot = true;
}
}Add:
//check the e-mail adress against fSpamlist
$xml_string = file_get_contents('http://www.fspamlist.com/xml.php?email='.$mail);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spambot = true;
}elseif($spambot != true){
//e-mail not found in the database, now check the ip
$xml_string = file_get_contents('http://www.fspamlist.com/xml.php?ip='.$ip);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spambot = true;
}elseif($spambot != true}{
// IP not found, lets check the username
$xml_string = file_get_contents('http://www.fspamlist.com/xml.php?username='.$name);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spambot = true;
}
}
}My PHP isn't great, so apologies if there's any errors in the above.
Last edited by MysteryFCM (2008-09-18 2:10 pm)
Offline
Just an FYI ![]()
http://forum.hosts-file.net/viewtopic.p … &t=737
Offline
You should tell people that if they want to use that code, that in addition to copying and saving the code to a file named check_spammers.php (if they use the same filename as you did anyway) that they also need to create a folder under whatever folder they put that file into named spambots, and CHMOD it to 777 so that the text files you have the file creating will be able to be saved properly, otherwise they will get an error similar to this:
Warning: file_put_contents(spambots/sfs_specified_email_address.com.txt) [function.file-put-contents]: failed to open stream: No such file or directory in /../../check_spammers.php on line 72
Offline
I'd forgotten about that, hehe ....... I'll make the necessary modification in the post to mention it ![]()
Offline
Here's a question for ya... If you do a wildcard search for an Email Domain such as *@gawab.com, it seems to check the fSpamList database but not the SFS database. I commented out the fSpamList section to see if it was just finding things like that in there first, and doing so shows that it isn't doing that. It's not finding them in the SFS database at all...
Offline
I'll have a look into it ![]()
Offline
Cool... Thanks! ![]()
Offline
I've done a little debugging, and SFS doesn't seem to be allowing * checks. Returning the following when echoing the results;
<response success="true"> false"> <error>invalid email address</error> </response>
Offline
Bummer... That's odd though, considering you can do a wildcard search on the index page of the SFS website. Must just be an internal thing and you can't do it from anywhere else. Oh well... Thanks for checking it out for me.
Offline
No problem ![]()
I've updated the code anyway (got a couple extra debugging options and such)
Offline
Updated, and thanks to FastHosts being a pain in the rear and killing the domain, it's been moved aswell;
http://fspamlist.com/checkspammers/
Now also checks Sorbs, DSBL and Spamhaus (if an IP is entered anyway).
Offline
Updated again
)
http://fspamlist.com/checkspammers/?nam … bmit=check
Changes:
+ Added error handling for those using < PHP 5
+ Added error handling for those that don't have SimpleXMLElement available
* Cleaned up HTML/CSS code again
* "Prettied up" results
* Moved text to en.php to allow for localization
* Creation of text file with spammers details is now optional (see config.php)
* Everything except index.php and the images folder, now moved above htdocs root for security
* Cleaned up code formatting
* fSpamlist and StopForumSpam checks now split, so checking an e-mail address is no longer mandatory
Offline
Couple minor updates;
1. Fixed a minor bug in the HTML code
2. Code copied to check_spammers_plain.php and modified to allow phpBB3 users to have their forum check new registrants;
http://temerc.com/forums/viewforum.php?f=71
Offline
Updated again to allow those without SimpleXMLElement available, to still use the functions
Offline
Hi, MysteryFCM!
I get your new code but how can I install it in phpbb2 \if it possible\?
Thanks in advance!
Offline
Open /includes/usercp_register.php
Find:
$error = FALSE;
Replace with:
$error = FALSE;
/// BEGIN SPAM MOD
$username = $HTTP_POST_VARS['username'];
$email = $HTTP_POST_VARS['email'];
$ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') );
$fspamcheck = file_get_contents('http://temerc.com/Check_Spammers/check_spammers_plain.php?name='.$username.'&email='.$email.'&ip='.$ip);
//echo $fspamcheck;
if (strpos($fspamcheck, 'TRUE') !==False) {
// Notify admin via e-mail
$blockedby = str_replace(' TRUE', '', $fspamcheck);
$blockedby = str_replace(' ', ' & ', $blockedby);
$msg = 'The following was blocked by the '.$blockedby.' filter<br><br>Username: '.$username.'<br><br>Email: '.$email.'<br><br>IP: '.$ip;
$to = "YOUR_EMAIL_ADDRESS";
$subject = "Spammer blocked by hpHosts Spam filter";
$headers = "MIME-Versin: 1.0\r\n" .
"Content-type: text/html; charset=ISO-8859-1; format=flowed\r\n" .
"Content-Transfer-Encoding: 8bit\r\n" .
"From: " . $from . "\r\n" .
"X-Mailer: hpHosts Spam Filter";
mail($to, $subject, $msg, $headers);
// Notify user
message_die(GENERAL_MESSAGE, "Registration blocked by spam filter. Please contact the forum administrator.", '', __LINE__, __FILE__);
}
/// END SPAM MODIf you are hosting the check_spammers function locally, then change;
http
/temerc.com/Check_Spammers/check_spammers_plain.php
to;
http
/YOUR_DOMAIN/PATH_TO_CHECK_SPAMMERS/check_spammers_plain.php
Last edited by MysteryFCM (2008-11-28 4:51 am)
Offline
This is very simple and easy.
Thank you very much! ![]()
Offline
My pleasure ![]()
Offline
Sorry, MysteryFCM, but your spam filter doesn't work in my board \phpbb2\.
When I click "agree" link, I get error:
Warning: file_get_contents(http://temerc.com/Check_Spammers/check_spammers_plain.php?name=&email=&ip=192.168.0.1) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in C:\xAmp\xampp\htdocs\phpbb2\includes\usercp_register.php on line 84
The line 84 is
$fspamcheck = file_get_contents('http://temerc.com/Check_Spammers/check_spammers_plain.php?name='.$username.'&email='.$email.'&ip='.$ip);I have uploaded folders: check_spammers\private\ in my root dir and change http://temerc.com/Check_Spammers/check_ … _plain.php to http://MY_DOMAIN/heck_spammers/private/check_spammers_plain.php
Now I cann't open register page. ![]()
What can I do?
Offline
You need to ensure file_get_contents is available. You can check this by using the following (place it in a file called "temp.php", and run it on the server);
<?php
if(function_exists('file_get_contents')){
echo 'file_get_contents is available';
}else{
echo 'file_get_contents is not available';
}
?>If this tells you it's not available, check php.ini for the following;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files. allow_url_fopen = On ; Whether to allow include/require to open URLs (like http:// or ftp://) as files. allow_url_include = Off
allow_url_include should always be Off, but allow_url_fopen needs to be "On" for this function to be available.
/edit
Corrected typo
/edit 2
I forgot to mention, you can also check the copy on your server directly, by going to;
http://YOUR_SERVER/{PATH_TO_Check_Spammers}/check_spammers_plain.php?name=test&email=tom@xxx-search.info&ip=195.24.76.232
If it's installed correctly, the output should be as displayed at;
http://fspamlist.com/checkspammers/?nam … .24.76.232
Last edited by MysteryFCM (2008-11-28 10:59 am)
Offline