WordPress.org

Plugin Directory

GeoIP Detection

Retrieving Geo-Information using one the Maxmind GeoIP2 databases.

Provides geographic information detected by an IP adress. This can be used in themes or other plugins, as a shortcode, or via CSS body classes. The city & country names are translated in different languages (supported languages).

Features:

  • Provides these 5 functions (see API Documentation):
    • geoip_detect2_get_info_from_ip($ip, $locales = array('en'), $options = array()): Lookup Geo-Information of the specified IP
    • geoip_detect2_get_info_from_current_ip($locales = array('en'), $options = array()): Lookup Geo-Information of the current website user
    • geoip_detect2_get_current_source_description(...): Return a human-readable label of the currently chosen source.
    • geoip_detect2_get_external_ip_adress(): Fetch the internet adress of the webserver
    • geoip_detect2_get_client_ip(): Get client IP (even if it is behind a reverse proxy)
  • You can use one of these data sources (see comparison):
  • For the property names, see the results of a specific IP in the wordpress backend (under Tools > GeoIP Detection).
  • You can include these properties into your posts and pages by using the shortcode [geoip_detect2 property="country.name" default="(country could not be detected)" lang="en"] (where 'country.name' can be one of the other property names as well, and 'default' and 'lang' are optional).
  • When enabled on the options page, it adds CSS classes to the body tag such as geoip-country-DE and geoip-continent-EU.
  • When enabled on the options page, the client IP respects a reverse proxy of the server.

See API Documentation for more info.

How can I use these functions?

  • You could choose the currency of the store based on the country name
  • You could suggest an timezone to use when displaying dates
  • You could show the store nearest to your customer
  • You show or hide content specific to a geographic target group
  • Etc. ... You tell me! I'm rather curious what you'll do with this plugin!

System Requirements: You will need at least PHP 5.3.1.

This product can provide GeoLite2 data created by MaxMind, available from http://www.maxmind.com.

Requires: 3.5 or higher
Compatible up to: 4.3
Last Updated: 2015-8-12
Active Installs: 3,000+

Ratings

5 out of 5 stars

Support

9 of 9 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,2,2
100,1,1
100,1,1
100,1,1
100,1,1 0,1,0
100,1,1