Ik zoek een ip blokker,die automatisch buitenlandse ips blokkeert.
Geen Deadline,maar het is tegen spam.
Geen Deadline,maar het is tegen spam.
<link rel="stylesheet" type="text/css" href="style.css">
[COLOR= #0000BB]<?php
$landen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL] [COLOR= #007700]([/COLOR]
[COLOR= #DD0000]"be"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"België"[/COLOR][COLOR= #007700],[/COLOR]
[COLOR= #DD0000]"nl"[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #DD0000]"Nederland"[/COLOR]
[COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/global"]global[/URL] [COLOR= #0000BB]$landen[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Landen array ophalen zodat we die kunne gebruiken [/COLOR]
[COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR]REMOTE_ADDR[COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$host[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/gethostbyaddr"]gethostbyaddr[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Host ophalen d.m.v. het ip adres [/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$host[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$ip[/COLOR] [COLOR= #007700])
{[/COLOR]
[COLOR= #FF8000]// De host is hetzelfde als het ip adres dus land is Onbekend [/COLOR]
[COLOR= #007700]}[/COLOR]
[COLOR= #0000BB]$hostsplit[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR] [COLOR= #DD0000]"."[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$host[/COLOR] [COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Hak de host in stukjes op de punt [/COLOR]
[COLOR= #0000BB]$ext[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array_pop"]array_pop[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$hostsplit[/COLOR] [COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// Pak het laatste item [/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]( ![/COLOR][URL="http://www.php.net/IsSet"]IsSet[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$landen[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$ext[/COLOR][COLOR= #007700]] ) )[/COLOR] [COLOR= #FF8000]// kijkt of het land NIET nederland of belgie is [/COLOR]
[COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// toont engelse boodschap als het land niet nederland of belgie is [/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<table align=center width=630>
<tr><td class=subTitle><b><b>Proxy Server - Geen Toegang</b></td></tr>
<tr><td class=mainTxt>Er is een fout opgetreden bij het laden van de door u opgevraagde pagina. U bevind zich achter een Proxy Server of Buitenlands IP. Deze zijn niet toegestaan!<br><br>Vragen: Contact@JOUDOMEIN.nl</b></table></td></tr>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
}[/COLOR]
?>
</head> order allow,deny
allow from hier het ip-adres
allow from hier het ip-adres
allow from hier het ip-adres
deny from all
want mijn ip zit er niet eens tussen.
Schepers schreef:Met intervals, 1 bericht na elkaar per IP, etc..En hoe zou ik dat moeten doen dan?