Go Back   Web Server Hosting Forum by BODHost > Support > Tutorials and Documentation
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-09-07, 09:59
BOD Member
 
Join Date: Nov 2005
Posts: 112
Send a message via MSN to bill mates
Default How to Stop Spamming in forum

I am running several phpBB-based forums, and they all started receiving serious amounts of spam recently.How can I stop this spamming ?
Reply With Quote
  #2 (permalink)  
Old 11-10-07, 07:08
BOD Member
 
Join Date: Mar 2006
Location: Scotland
Posts: 201
Default

You can stop spamming in forum by using this bbAntiSpam's free Links Rejector. It prevents any guest posts that contain links, phone numbers, e-mail addresses or any other contact information . If any contact details are found, Links Rejector displays a message prompting the user to remove the contact information and resubmit the message again. Since robots are not especially bright, they won't do this and the spam never gets sent.

This links Rejector stops something like 99% of spam on my phpBB 2 board.
Reply With Quote
  #3 (permalink)  
Old 11-10-07, 12:30
BOD Member
 
Join Date: Oct 2007
Posts: 34
Default

Quote:
Originally Posted by bill mates View Post
I am running several phpBB-based forums, and they all started receiving serious amounts of spam recently.How can I stop this spamming ?
Simple way i found to stop spamming on forum is ask question so that spam bot can't spam on your forum but question should be so simple that every user of forum should able to answer that question. Please answer this difficult question 1 + 1 = ?

How to fix it. Search for template directory at the path where you have installed phpbb forum & add the following code in the file profile_add_body.tpl

HTML Code:
<tr>
    <td class="row1"><span class="gen"> Please answer this difficult question 1 + 1 = ?</span></td>
    <td class="row2">
        <input type="text" class="post" style="width: 200px" name="math_question" size="6" maxlength="6" value="" />
    </td>
</tr>
To see the effect of the code browse registration page of forum.

Now from the same location search for php file includes/usercp_register.php &Go to end of file and add following code this code will verify the answer posted by visitors is correct or not.

HTML Code:
else if ( $mode == 'register' )
    {
        if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
        {
            $error = TRUE;
            $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
        };

        if (!isset($_POST['math_question']) || $_POST['math_question'] != '2') {
            $error = TRUE;
            $error_msg .= (isset($error_msg) ? '<br/>' : '') . "Incorrect answer to the mathematical question...";
        }
    }
May be some spammer configure spam bot such way to ans the questions and you will face spamming problem again in that case you need to change the question and it's ans.

To change the questions need to edit question in the following line in the first code.

HTML Code:
<td class="row1"><span class="gen"> Please answer this difficult question 1 + 1 = ?</span></td>
And to change it's ans change the following line in the second code.

HTML Code:
if (!isset($_POST['math_question']) || $_POST['math_question'] != '2') {
Replace the number 2 by answer from the above line & use this is code in the php file.


Glenn.
Reply With Quote
  #4 (permalink)  
Old 11-12-07, 05:56
BOD Member
 
Join Date: Nov 2005
Posts: 112
Send a message via MSN to bill mates
Default

Thanks Glenn,
for this quick reply I will make the changes and let you know.
Reply With Quote
  #5 (permalink)  
Old 11-13-07, 06:06
BOD Member
 
Join Date: Nov 2005
Posts: 206
Default

You can also stop spamming by turning off the guest posting permissions.till the deluge subsides.
Reply With Quote
  #6 (permalink)  
Old 11-13-07, 07:29
BOD Member
 
Join Date: Nov 2005
Location: New Mexico
Posts: 273
Default

Check the official vBulletin forum to ban the spammers, i have checked out few codes in that forum.
Reply With Quote
  #7 (permalink)  
Old 11-14-07, 06:27
Moderator
 
Join Date: Oct 2005
Posts: 346
Default

If you are using vBulletin than you can stop spamming by following these steps:-

1) Through the Admin CP product manager import product-nospam.xml.
2) NOw go to your vBulletin options in the Admin CP and select NoSpam! Settings. Once this is turn on input your questions and answers according to the instructions given there.
Reply With Quote
  #8 (permalink)  
Old 11-20-07, 09:47
sam sam is offline
BOD Member
 
Join Date: Jul 2007
Posts: 141
Send a message via Yahoo to sam
Default

Quote:
Originally Posted by Glenn View Post
Simple way i found to stop spamming on forum is ask question so that spam bot can't spam on your forum but question should be so simple that every user of forum should able to answer that question. Please answer this difficult question 1 + 1 = ?

How to fix it. Search for template directory at the path where you have installed phpbb forum & add the following code in the file profile_add_body.tpl

HTML Code:
<tr>
    <td class="row1"><span class="gen"> Please answer this difficult question 1 + 1 = ?</span></td>
    <td class="row2">
        <input type="text" class="post" style="width: 200px" name="math_question" size="6" maxlength="6" value="" />
    </td>
</tr>
To see the effect of the code browse registration page of forum.

Now from the same location search for php file includes/usercp_register.php &Go to end of file and add following code this code will verify the answer posted by visitors is correct or not.

HTML Code:
else if ( $mode == 'register' )
    {
        if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
        {
            $error = TRUE;
            $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
        };

        if (!isset($_POST['math_question']) || $_POST['math_question'] != '2') {
            $error = TRUE;
            $error_msg .= (isset($error_msg) ? '<br/>' : '') . "Incorrect answer to the mathematical question...";
        }
    }
May be some spammer configure spam bot such way to ans the questions and you will face spamming problem again in that case you need to change the question and it's ans.

To change the questions need to edit question in the following line in the first code.

HTML Code:
<td class="row1"><span class="gen"> Please answer this difficult question 1 + 1 = ?</span></td>
And to change it's ans change the following line in the second code.

HTML Code:
if (!isset($_POST['math_question']) || $_POST['math_question'] != '2') {
Replace the number 2 by answer from the above line & use this is code in the php file.


Glenn.
Thanks Glenn,

I have made the changes according to your instructions and it really works for my forum it decreases the rate of spamming more than 80 percent.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 02:20.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.