kiroh
04-10-2006, 06:33 PM
I'm trying out something... I've taken the idea from no-refer-spam, and applied it to index.php. I'm not sure how effective this will be, or if it's too inefficient - I'm not a PHP coder by any means...
In the "Save Comments" section, where the existing spam check code is, I moved the initial set statements for $parent_id, $name, $message, $url, $parent_name and $email so that they all appear after "$email_flag=0;".
Then, all I did was add the following:
// spam list
$spams = array (
"spamkeyword1",
"spamkeyword2",
);
foreach ($spams as $site) {
if (eregi($site,$parent_id) || eregi($site,$message) || eregi($site,$name) || eregi($site,$url) || eregi($site,$parent_name) || eregi($site,$email)){ die("SPAM Stopped: reason - $site");}
}
After this whatever checks there were already are done. Does anyone see anything wrong with doing it this way (aside from the fact that this has the potential to block legit posts)?
In the "Save Comments" section, where the existing spam check code is, I moved the initial set statements for $parent_id, $name, $message, $url, $parent_name and $email so that they all appear after "$email_flag=0;".
Then, all I did was add the following:
// spam list
$spams = array (
"spamkeyword1",
"spamkeyword2",
);
foreach ($spams as $site) {
if (eregi($site,$parent_id) || eregi($site,$message) || eregi($site,$name) || eregi($site,$url) || eregi($site,$parent_name) || eregi($site,$email)){ die("SPAM Stopped: reason - $site");}
}
After this whatever checks there were already are done. Does anyone see anything wrong with doing it this way (aside from the fact that this has the potential to block legit posts)?