PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
mrix
Client


Joined: Dec 04, 2004
Posts: 485

PostPosted: Mon Apr 17, 2006 12:13 pm Reply with quote Back to top

Hello all, I have a phpbb stand alone forum and somebody from this website
Only registered users can see links on this board!
Get registered or login to the forums!
is constantly joining my forum with different names but not posting Question I think its down they are just spamming links from their etc. Is there a way of banning their website kind of thing from stopping them adding it? it would be good to ban them but without them posting how would I get an ip etc?
Cheers
mrix
View user's profile Send private message Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2749

PostPosted: Mon Apr 17, 2006 1:30 pm Reply with quote Back to top

Yes qualityandsweet.info are using robots to do that. Do you have the visual confirmation turned on? That will help.

You may want to see phpBB for any mods that stop spammers
View user's profile Send private message Visit poster's website
mrix
Client


Joined: Dec 04, 2004
Posts: 485

PostPosted: Mon Apr 17, 2006 1:52 pm Reply with quote Back to top

Hello thanks for the help where you say
Quote:
visual confirmation turned on?
where would I turn that on?
thanks
|2es-mrix
View user's profile Send private message Visit poster's website
mrix
Client


Joined: Dec 04, 2004
Posts: 485

PostPosted: Mon Apr 17, 2006 1:52 pm Reply with quote Back to top

Hello thanks for the help where you say
Quote:
visual confirmation turned on?
where would I turn that on?
thanks
|2es-mrix
View user's profile Send private message Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2749

PostPosted: Mon Apr 17, 2006 2:03 pm Reply with quote Back to top

Forums Configuration
View user's profile Send private message Visit poster's website
mrix
Client


Joined: Dec 04, 2004
Posts: 485

PostPosted: Mon Apr 17, 2006 3:49 pm Reply with quote Back to top

Yea I can remember trying that option before but when anyone regesters it comes up with an error saying

The confirmation code you entered was incorrect

it also doesnt show the security number for some reason?

cheers
|2es-mrix
I wonder if I could block the spider in robots.txt ???
View user's profile Send private message Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2749

PostPosted: Mon Apr 17, 2006 6:43 pm Reply with quote Back to top

Not sure why the confirmation isn't working, time to ask
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website
mrix
Client


Joined: Dec 04, 2004
Posts: 485

PostPosted: Wed Apr 19, 2006 2:42 pm Reply with quote Back to top

I managed to find this code that worked a treat!

## MOD Title: Instant Ban - Spam Bots registration
## MOD Author: niekas
## MOD Description: prevents spam bots registering on your forum by
## removing website and signature fields in registration and profile form
##untill users reached certain amount of posts
## MOD Version: 1.0.1
##
## Installation Level: (Easy)
## Installation Time: ~5 minutes
## Files To Edit:
## /includes/usercp_register.php
## /templates/subSilver/profile_add_body.tpl
## Included Files: (n/a)

#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#

$error = FALSE;


#
#-----[ AFTER, ADD ]------------------------------------------
#

$cut_off=10; //how many posts should user have before form fields are activated

// ---------------------------------------
if (($mode == 'register' && ($HTTP_POST_VARS['website'] != '' || $HTTP_POST_VARS['signature'] != '') ) || ($userdata['user_posts'] < $cut_off && $mode=='editprofile' && ($HTTP_POST_VARS['website'] != '' || $HTTP_POST_VARS['signature'] != '')))
{
$ban_this=encode_ip(getenv('REMOTE_ADDR'));

$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip)
VALUES ('" . $ban_this . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_ip = '" . $ban_this . "'";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
}
message_die(GENERAL_MESSAGE, "banned", '', __LINE__, __FILE__);

}

#
#-----[ FIND ]------------------------------------------
#
if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
}

#
#-----[ REPLACE WITH ]------------------------------------------
#

if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
if ($userdata['user_posts'] >= $cut_off)
{
$template->assign_block_vars('switch_edit_website', array());
}
}

#
#-----[ OPEN ]------------------------------------------
#

/templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_WEBSITE}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="website" size="25" maxlength="255" value="{WEBSITE}" />
</td>
</tr>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_edit_website -->

#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- END switch_edit_website -->


#
#-----[ FIND ]------------------------------------------
#

<tr>
<td class="row1"><span class="gen">{L_SIGNATURE}:</span><br /><span class="gensmall">{L_SIGNATURE_EXPLAIN}<br /><br />{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
<td class="row2">
<textarea name="signature"style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea>
</td>
</tr>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_edit_website -->

#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- END switch_edit_website -->










Of course you can add a notice about this in your template - that website and signature field will be activated after certain amount of posts or ask them to contact administrator.

Let me know if it works for you


UPDATE - if you'd rather only check against website and leave signatures intact use this simplier code:

Code:


#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#

$error = FALSE;


#
#-----[ AFTER, ADD ]------------------------------------------
#


// ---------------------------------------
if ($mode == 'register' && $HTTP_POST_VARS['website'] != '' )
{
$ban_this=encode_ip(getenv('REMOTE_ADDR'));

$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip)
VALUES ('" . $ban_this . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_ip = '" . $ban_this . "'";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
}
message_die(GENERAL_MESSAGE, "banned", '', __LINE__, __FILE__);

}


#
#-----[ OPEN ]------------------------------------------
#

/templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_WEBSITE}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="website" size="25" maxlength="255" value="{WEBSITE}" />
</td>
</tr>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_edit_profile -->

#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- END switch_edit_profile -->
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum