192.168.0.0
92.241.154.*
125.116.*.*
91.191.*.*
**Dateiname:** cnt18.article.inc.php
**Ort:** include/inc_front/content/
Erweiterung der Datei include/inc_front/content/cnt18.article.inc.php etwa ab Zeile 330 direkt vor
// Captcha check
if(empty($guestbook['captcha'])) { ........
diesen
==== Codeschnipsel ====
einfügen:
// 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!
';
}
}
// ===============================
\\
==== Vorlage ====
Nun ist in der Vorlage der Ausschluss von einzelnen IPs oder auch einfachen IP-Bereichen möglich:
Z.B.:
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 Abfrage ====
Z.B.
* [[http://cqcounter.com/whois/]] (//auch wildcard möglich)//
* [[http://www.ipaddresslocation.org/]] (//Get and find IP address ranges corresponding for each country//)
* [[http://www.heise.de/netze/tools/whois-abfrage]]