code to block IPs of certain countries:
<cflock timeout="10" throwontimeout="Yes" name="geoLocatorLOCK" type="EXCLUSIVE">
<cfinclude template="geoLocatorLIB.cfm">
<cfscript>
acceptableCountries="BE,DK,LU,..."; //could be pulled from db or ini file at app start up
ok=init();
if (ok)
thisCountry=findCountry(cgi.REMOTE_ADDR,cgi.HTTP_ACCEPT_LANGUAGE);
</cfscript>
</cflock>
<!--- <cfif ok> --->
<cfif listFindNoCase(acceptableCountries,thisCountry)>
<cflocation url=""> <cfelse>
Sorry, you don't have permission to access this page !<br>
If your require access please send an eMail to: <a href="" PROTECTED]">[EMAIL PROTECTED]</a>
</cfif>
You can get the CF5-version of
GeoLocator from:
http://cftools.sdsolutions.de
(Thanks Paul !)
Uwe
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

