1

I'm helping a small non-profit with their website and we are going to have a login and membership system where we need to verify that a user is from a certain country. How can this be done? We are going to use Drupal 7 or possibly WordPress if there is a better solution there

What we have been thinking about so far is using SMS verification when signing up and then checking the country code, but it would need to be cost-free since otherwise a lot of money could be lost for the organization if the verification is done automatically

Thoughts, ideas, other suggestions?

2
  • 2
    Is IP based country verification not sufficient? Both Drupal and Wordpress have modules for getting visitors country based on IP and it's rather simple to do with PHP or JS plus there are tons of online services with API's dedicated to doing that for you.. Commented Oct 5, 2016 at 16:52
  • Alari: This would help but i worry that traffic will be bounced if someone is determined enough to fake the country. This is better than nothing though!
    – sunyata
    Commented Oct 5, 2016 at 21:26

1 Answer 1

2

Here is a simple thought, when signing up have a field that that forces them to pick from one of the selected countries you speak of.

The reality is, anyone that is criminal minded will have no problem faking an Ip or most any other block you place in front of them. A VPN can easily bypass anything you put in place restricting IP's.

I have seen people use htaccess to block countries and/or only allow certain countries but that code can grow to 4megs+.

If you want to use that route and are uncomfortable generating the list, you can use an online generator like found here.

http://incredibill.me/htaccess-rewrite-wizard

Note: You can get country code lists from here. http://www.ip2location.com/blockvisitorsbycountry.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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