192.168.0.0
92.241.154.*
125.116.*.*
91.191.*.*
**file name:** cnt18.article.inc.php
**location:** include/inc_front/content/
Enhancement of the file include/inc_front/content/cnt18.article.inc.php for instance starting from line 330 directly forwards
// Captcha check
if(empty($guestbook['captcha'])) { ........
insert this
==== Code snipped ====
// Banned IP ================= +kh 24.10.09
if( !empty($guestbook['ban_ip']) ) {
$_ip = getRemoteIP();
$_ipex = explode('.', $_ip);
//exampl.IP 123.456.678.901
// $_ipex [0] [1] [2] [3]
$_ipex[3] = '*'; // 123.456.678.*
$_ip01 = implode ('.',$_ipex);
$_ipex[2] = '*'; // 123.456.*.*
$_ip02 = implode ('.',$_ipex);
if ( strpos($guestbook['ban_ip'], $_ip01) OR // xxx.yyy.zzz.*
strpos($guestbook['ban_ip'], $_ip02) OR // xxx.yyy.*.*
strpos($guestbook['ban_ip'], $_ip) )
{
$guestbook['flooding'] = 1;
$guestbook['readform'] = 1;
// $guestbook['spamalert'] = 'Your IP '.getRemoteIP().' is not allowed to send form (Blacklist)!';
$guestbook['spamalert'] = '
Sorry, your are not allowed to send form!
';
}
}
// ===============================
\\
==== Template ====
In template now the exclusion of individual IPs or IP ranges is also possible:
E.g.:
192.168.0.0
92.241.*.*
125.116.15.*
91.191.*.*
Your IP '.getRemoteIP().' is not allowed to send form (Blacklist)!';
$guestbook['spamalert'] = '
Sorry, your are not allowed to send form!
';
}
}
// ===============================
// Captcha check
if(empty($guestbook['captcha'])) { ...........
======================================================== */
?>
\\
==== Whois call ====
E.g.
* [[http://cqcounter.com/whois/]] (//also wildcard possible)//
* [[http://www.ipaddresslocation.org/]] (//Get and find IP address ranges corresponding for each country//)
* [[http://www.heise.de/netze/tools/whois-abfrage]]