Copy link to clipboard
Copied
Is there a way to deny a user access to a webpage based on their IP origin? For instance, if I wanted ONLY U.S. IP addresses accessing my site, how would I go about doing this? I have a hosting account with a hosting company, so I dont have access to the web server directly, so the only option that I know of is to limit the visitors access based on IP once they try to access the site.
Thanks!
Copy link to clipboard
Copied
The first thing would be do get access to any data that marries up IP addresses to countries.
Copy link to clipboard
Copied
none of the ip-country DBs are 100% accurate but:
http://www.maxmind.com/
http://www.geoiptool.com/
http://www.hostip.info/
word of advice, don't use the db based versions, use a binary one. much much faster.
we have one as well (mainly aimed at finding users' locales via IP & CGI/browser
vars) but it's data has not been updated in a while:
http://javainetlocator.sourceforge.net/
http://www.sustainablegis.com/projects/geoLocator/ (cfc code)