• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Restrict site access based on country of origin

New Here ,
Apr 26, 2010 Apr 26, 2010

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!

TOPICS
Advanced techniques

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 26, 2010 Apr 26, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 26, 2010 Apr 26, 2010

Copy link to clipboard

Copied

LATEST

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation