Join the web development community

How to detect user country at Drupal 7 website

Is there any module to detect the country the user is coming from for a Drupal 7 website. I want to preselect the country the user come from in a search form.

Salehin's picture

Use modules to locate user region

Vote the answer: 
0
No votes yet

IP-based Determination of a Visitor's Country is a module This module that will save the geographical location(name of the country more specifically) of users. It will use users IP address and save the data in the format of ISO 4166 characters. Even other modules can access and use the saved data. There are several other modules use this module to provide their services. And you can use the saved data to provide services based on the location of the users.

 

Country Specific Nodes is another module which lets you provide location based services by creating nodes. You can set specific nodes which will only be shown when users access the site from a certain region of the globe. This module requires the previous module to provide all these services.

 

Smart IP is a module which will provide you user's country along with some other information like postal code, city. And all these information are saved in the $_SESSION in an array.