vernal pool

Mittineague

phpBB Forum MOD - Block DNSBL Blacklisted Posting

There are no plants in blossom on February the 3rd.
The earliest date currently listed is Mar 15, and the latest date is Nov 11
*Note: Both the spews and dsbl sites are no longer active. Because of this, and the fact that phpBB3 has been out for a while now, this MOD is no longer supported. It is left here for informational purposes only. Do not apply this MOD to your forum.
############################################################## 
## MOD Title: Block DNSBL Blacklisted Posting
## MOD Author: Mittineague < N/A > ( N/A ) http://www.mittineague.com/dev
## MOD Description: Prevents those whose IP address is listed on DNSBLs from posting.
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 1 Minute
##
## Files To Edit: 2   posting.php
##      language/lang_english/lang_main.php
## 
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##    This MOD is based heavily (almost entirely) on the 
##    DNSBL Blacklisted Registrants MOD by TerraFrost
##    TerraFrost < N/A > (Jim Wigginton) http://www.frostjedi.com/phpbb
##
##    The author found that although DNSBL and Open Proxy registrations
##    were successfully being blocked by using TerraFrost's MODs, SPAM
##    posts were still being made by "members" that had registered using
##    "good" IP addresses.
##
##############################################################
## MOD History:
##
##   2007-01-23 - Version 1.0.1  -  rewritten as standalone MOD
##
##   2007-01-14 - Version 1.0.0  -  initial release as
##          "Block DNSBL Blacklisted Registrants - Addon"
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ OPEN ]------------------------------------------
#
posting.php
 
#
#-----[ FIND ]------------------------------------------
#
$refresh = $preview || $poll_add || $poll_edit || $poll_delete;
 
#
#-----[ BEFORE, ADD ]------------------------------------
#
if ( (isset($mode)) && ($mode != '') )
{
  include_once $phpbb_root_path . 'language/lang_english/lang_main.php';
 
  $address = $HTTP_SERVER_VARS['REMOTE_ADDR'];
  $rev = implode('.',array_reverse(explode('.', $address)));
 
  $lookup = "$rev.l1.spews.dnsbl.sorbs.net";
  if ($lookup != gethostbyname($lookup))
  {
    message_die(GENERAL_MESSAGE, strtr($lang['dsbl_p'],array('%url%' => "http://www.spews.org/ask.cgi?x=$address")));
  }
 
  $lookup = "$rev.sbl-xbl.spamhaus.org";
  if ($lookup != gethostbyname($lookup))
  {
    message_die(GENERAL_MESSAGE, strtr($lang['dsbl_p'],array('%url%' => "http://www.spamhaus.org/query/bl?ip=$address")));
  }
 
  $lookup = "$rev.list.dsbl.org";
  if ($lookup != gethostbyname($lookup))
  {
    message_die(GENERAL_MESSAGE, strtr($lang['dsbl_p'],array('%url%' => "http://dsbl.org/listing?$address")));
  }
}
 
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
 
#
#-----[ FIND ]------------------------------------------
#
$lang['A_critical_error'] = 'A Critical Error Occurred';
 
#
#-----[ AFTER, ADD ]------------------------------------
#
$lang['dsbl_p'] = '<p>Your IP address is on a <a href="%url%">DNS-based Blackhole List</a>.</p><p>Posting attempt blocked.</p>';
 
#
#-----[  SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
no_dnsbl_posts.mod
with alternate Block DNSBL Blacklisted Posting - Black MOD mod_no_dnsbl_posts.zip
About - Blog - Sitemap - Contact - Forums - Home 

PHP icon. PEAR icon. MySQL icon. phpBB icon. Sitepoint icon. Valid XHTML 1.0 icon. Valid CSS! icon. Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0