Only Allow Access From Specific Geographic Area
Moderator: General Moderators
-
braveryonions
- Forum Newbie
- Posts: 14
- Joined: Wed Feb 11, 2009 3:31 pm
Only Allow Access From Specific Geographic Area
How can I allow access to a site only from a specific area? I want to allow only people in my county to view my site.
Re: Only Allow Access From Specific Geographic Area
You can sort of, sometimes, get a moderate estimate of the geographical location of a visitor's ISP based on their IP address.
I wouldn't suggest restricting access using this method (personally, I wouldn't block anyone from viewing my site without a good reason).
There's probably a better solution for what you're trying to accomplish.
I wouldn't suggest restricting access using this method (personally, I wouldn't block anyone from viewing my site without a good reason).
There's probably a better solution for what you're trying to accomplish.
Re: Only Allow Access From Specific Geographic Area
some people from your country may not be in your country. they may be travelling or may be working offshore.braveryonions wrote:I want to allow only people in my county to view my site.
Last edited by php_east on Mon Mar 23, 2009 6:07 am, edited 1 time in total.
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: Only Allow Access From Specific Geographic Area
I think websites like Pandora accomplish this with IP addresses. Although they can be spoofed and sometimes aren't accurate it's the only feasible means of doing it.
Re: Only Allow Access From Specific Geographic Area
here is a counrty-ip database i used for user tracking purposes on one module i made sometime ago, the database is free is relatively good, with users updating it and the site maitaining an updated version. it should be suffcient for your purpose.
this database at http://ip-to-country.webhosting.info
More informaton on this Database is at http://ip-to-country.webhosting.info/node/view/12.
you can then easily make a php or perhaps even .htaccess to manage your visitors.
enjoy.
this database at http://ip-to-country.webhosting.info
More informaton on this Database is at http://ip-to-country.webhosting.info/node/view/12.
you can then easily make a php or perhaps even .htaccess to manage your visitors.
enjoy.