This post will hopefully stop spammers from signing up on your phpbb forum. Just follow the steps below:
1. First open the file in the phpbb root, /includes/usercp_register.php
2. Find this part in the script:
PHP 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'];
}
3. Now add the following exactly below it:
PHP Code:
// ---- check not a dogy user ------
// By Alex Illsley 2006
// www.fireproductions.co.uk
function user_dogy_check($word) {
if(stristr(strtolower($_POST['occupation']), $word)) { return "TRUE"; }
if(stristr(strtolower($_POST['interests']), $word)){ return "TRUE"; }
if(stristr(strtolower($_POST['website']), $word)) { return "TRUE"; }
}
if (user_dogy_check("sex")
OR user_dogy_check("anal")
OR user_dogy_check("porn")
OR user_dogy_check("tramadol")
OR user_dogy_check("pharm")
OR user_dogy_check("viagra")
OR user_dogy_check("dating")
OR user_dogy_check("nude"))
{ $error=TRUE; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . "Dogy User Profile, ACCESS DENIED!"; }
// CHECK END
I also made my own PHP capatcha aswell for my phpbb forum, i get like no spam bots now.
I hope this helps someone,
Alex
Recent comments
20 hours 52 min ago
1 day 1 hour ago
1 day 6 hours ago
1 day 8 hours ago
1 day 22 hours ago
1 day 22 hours ago
2 days 3 hours ago
2 days 10 hours ago
2 days 10 hours ago
2 days 12 hours ago