-1

I want to check that people who registrates in my site and check in country box , for example, Argentina is really living in Argentina. How can I make sure that people is really living in that country and not access to my site via proxy or VPN?

  • Here is a relevent question on SO: stackoverflow.com/questions/1000924/… – WalterJ89 Mar 5 '12 at 6:06
  • I don't think you can based on the IP address. For example there is the Tor project (torproject.org). Although you can't control which IP address is used, each user can prevent you from detecting their geographical location when they go through the Tor network. – Manfred Mar 5 '12 at 6:50
  • 2
    Why do you need to ask them where they live, if you can detect it anyway? – user1249 Mar 5 '12 at 7:17
  • @John: I think the point is he wants to make sure people aren't using Tor or a proxy or something. Although, if you're using a Proxy/VPN what's to stop you just putting the country your proxy is in? – Dean Harding Mar 5 '12 at 8:30
9

There's no way to guarantee where a person is based on their IP address. You can get a reasonable guess from GeoIP info. But you cannot ever really be sure. You can mess around with headers trying to guess if a proxy is being used, but headers might not always be there.

So, unless you have some legal reason to do this (for example, hosting content you're only licensed to make available in certain countries), or just want to annoy potential users who might be surfing via their company's VPN or remote desktop that happens to be hosted outside the country, I wouldnt even waste my time with it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.