View Single Post
  #15  
Old 9th April 2007, 18:01
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
Smile

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
Reply With Quote