Skip to main content
Participant
April 26, 2010
Question

Restrict site access based on country of origin

  • April 26, 2010
  • 2 replies
  • 1170 views

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!

This topic has been closed for replies.

2 replies

Inspiring
April 27, 2010

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)

Inspiring
April 26, 2010

The first thing would be do get access to any data that marries up IP addresses to countries.