I need to block users from creating an account...
Posted by jonbond (jonbond), 7 August 2007I need to block users from creating an account if they do not live within 60 miles of my city. Is this possible by looking up the ip address info? Any ideas, or where to start?
My web page is hosted on yahoo.com, so I cant install any packages. I do have php v4.3 installed and mysql.
Thanks in advance for any help or direction.
Posted by admin (Graham Ellis), 7 August 2007No, it's not possible.
But you can get some way towards it.
If you have a look at www.maxmind.com (there are others too), they have a database of IP addresses that map to countries and there is an open source version there. I have that "included" on our pages and use it routinely to identify which country visitors come from. So you can exclude people from out of country (it's around 98% accurate to my knowledge).
Maxmind (and others) do more detailed databases that will give you greater granularity, but only to some extent, and at a price. You will never find a database that tells you the latitude and longitude of each IP to sort out your magic figure of 60 miles, and there will always be proxy servers around which make people who are near you look like they are distant, and vice versa!
Posted by jonbond (jonbond), 8 August 2007Thank you Graham. Much appreciated.
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho