IP2Location Variables

plugin banner

Easily get/display the visitor's location information based on IP address and customize the content display for different countries in pages, plugins, or themes. This plugin uses IP2Location BIN file for location queries, therefore there is no need to set up any relational database to use it.

Author:IP2Location (profile at wordpress.org)
WordPress version required:2.0
WordPress version tested:6.5
Plugin version:2.9.1
Added to WordPress repository:13-09-2013
Last updated:04-04-2024
Rating, %:46
Rated by:3
Plugin URI:https://ip2location.com/resources/wordpress-i...
Total downloads:8 691
Active installs:100+
plugin download
Click to start download

This useful library makes it easy to conveniently find website visitors location and provides geographic information based on IP address lookup. It also can be used to display geo-data info in posts for specific locations and to help you create geo-target marketing campaigns.

It is a library derived from https://www.ip2location.com/developers/php but works as a WordPress plugin to simplify the setup and ease the integration work. It supports both the IPv4 and IPv6 address.

Below are the geolocation information you can retrieve from this library:
* Country code
* Country name
* Country flag
* Region name
* City name
* Latitude and longitude
* ZIP code
* ISP
* Domain name
* Time zone
* Net speed
* IDD code
* Area code
* Weather station code & name
* MNC, MCC, mobile carrier name
* Elevation
* Usage type
* Address type
* Category

This plugin supports both IP2Location IP geolocation BIN data and web service for geolocation queries. If you are using the BIN data, you can update the BIN data every month by using the wizard on the settings page for the most accurate result. Alternatively, you can also manually download and update the BIN data file using the below links:

BIN file download: IP2Location Commercial database | IP2Location LITE database (free edition)

If you are using the IP2Location IP geolocation web service, please visit IP2Location Web Service for details.

Usage

Call the function ip2location_get_vars() in any pages, plugins, or themes to retrieve IP2Location variables. The variables are returned in object. To use lookup for a custom IP, use ip2location_get_vars(‘IP_ADDRESS’);

More Information

Please visit us at https://www.ip2location.com


ChangeLog