listed on Project Honey Pot.', 'php4bb' ), $_SERVER['REMOTE_ADDR'] ) ); } function php4bb_maybe_block() { $settings = bb_get_option( 'php4bb' ); if ( !$settings['httpbl-key'] ) return; $check = $settings['httpbl-key'] . '.' . implode( '.', array_reverse( explode( '.', $_SERVER['REMOTE_ADDR'] ) ) ) . '.dnsbl.httpbl.org'; $response = gethostbyname( $check ); if ( $response == $check ) return; $response = explode( '.', $response ); if ( $response[0] != '127' ) return; $days = (int)$response[1]; $threat = (int)$response[2]; $type = (int)$response[3]; if ( $type == 0 ) // Search engine return; if ( $settings['httpbl-days'] >= $days && $settings['httpbl-threat'] <= $threat && ( ( $settings['httpbl-confirmedonly'] && $type > 1 ) || !$settings['httpbl-confirmedonly'] ) ) php4bb_block(); } php4bb_maybe_block(); function php4bb_head() { $settings = bb_get_option( 'php4bb' ); $noemail = $settings['noemail']; ?>', '_', '
_
', '', '', '
_
', '_ ', '
' ); $text = array( 'Private', 'Secret', 'Email', 'Contact us', 'Magical rainbow ponies', 'Admin', 'Edit page', 'Register' ); $link = $linkformats[mt_rand( 0, count( $linkformats ) - 1 )]; $link = str_replace( '_', $text[mt_rand( 0, count( $text ) - 1 )], $link ); $link = str_replace( '%', $settings['hpot-url'], $link ); return $link; } if ( bb_is_admin() ) require_once dirname( __FILE__ ) . '/project-honey-pot-for-bbpress-admin.php';