Title: IP2Location Variables
Author: IP2Location
Published: <strong>13 septembre 2013</strong>
Last modified: 3 décembre 2025

---

Recherche d’extensions

![](https://ps.w.org/ip2location-variables/assets/banner-772x250.png?rev=1037226)

![](https://ps.w.org/ip2location-variables/assets/icon-128x128.png?rev=2121922)

# IP2Location Variables

 Par [IP2Location](https://profiles.wordpress.org/ip2location/)

[Télécharger](https://downloads.wordpress.org/plugin/ip2location-variables.2.9.9.zip)

 * [Détails](https://fr.wordpress.org/plugins/ip2location-variables/#description)
 * [Avis](https://fr.wordpress.org/plugins/ip2location-variables/#reviews)
 *  [Installation](https://fr.wordpress.org/plugins/ip2location-variables/#installation)
 * [Développement](https://fr.wordpress.org/plugins/ip2location-variables/#developers)

 [Support](https://wordpress.org/support/plugin/ip2location-variables/)

## Description

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](https://www.ip2location.com)
| [IP2Location LITE database (free edition)](https://lite.ip2location.com)

If you are using the IP2Location IP geolocation web service, please visit [IP2Location Web Service](https://www.ip2location.com/web-service)
for details.

#### Utilisation

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’);

#### Plus d’informations

Please visit us at [https://www.ip2location.com](https://www.ip2location.com)

## Installation

We always recommend the automatic installation via the plugin menu. In case you 
having the difficulties to do so, below are the manual install steps:

 1. Upload `ip2location` folder to the `/wp-content/plugins/` directory.
 2. Activez l’extension par l’intermédiaire du menu « Extensions » de WordPress.
 3. You can now start using IP2Location Variables to customize your contents.

Please take note that this plugin requires minimum **PHP version 5.4**.

## Avis

![](https://secure.gravatar.com/avatar/75f0c44247078547936075842c4a73a2c434b3a3e3077d46325be371a5197aa8?
s=60&d=retro&r=g)

### 󠀁[Does not work.](https://wordpress.org/support/topic/does-not-work-786/)󠁿

 [c4altoimpacto](https://profiles.wordpress.org/c4altoimpacto/) 2 mai 2017 1 réponse

Does not work properly, returns NULL.

![](https://secure.gravatar.com/avatar/b61095bbfd28c8f0e7722d30c00e3ee289b5ae4a9441f5a05e701ed83f642b8f?
s=60&d=retro&r=g)

### 󠀁[Working as intended](https://wordpress.org/support/topic/working-as-intended-8/)󠁿

 [sprudhomme](https://profiles.wordpress.org/sprudhomme/) 3 septembre 2016

I’ve been using this plugin for the past few months, allowing dynamic templates 
and content depending on the country code of the users. No issues so far!

![](https://secure.gravatar.com/avatar/69edf3d5a4b75408e989de6d9a10f53ecf37416e771fa9476311a2374184082f?
s=60&d=retro&r=g)

### 󠀁[not working](https://wordpress.org/support/topic/not-working-1639/)󠁿

 [Olegipst](https://profiles.wordpress.org/olegipst/) 3 septembre 2016

Doesn’t work, returns NULL

 [ Lire les 4 avis ](https://wordpress.org/support/plugin/ip2location-variables/reviews/)

## Contributeurs/contributrices & développeurs/développeuses

« IP2Location Variables » est un logiciel libre. Les personnes suivantes ont contribué
à cette extension.

Contributeurs

 *   [ IP2Location ](https://profiles.wordpress.org/ip2location/)

[Traduisez « IP2Location Variables » dans votre langue.](https://translate.wordpress.org/projects/wp-plugins/ip2location-variables)

### Le développement vous intéresse ?

[Parcourir le code](https://plugins.trac.wordpress.org/browser/ip2location-variables/),
consulter le [SVN dépôt](https://plugins.svn.wordpress.org/ip2location-variables/),
ou s’inscrire au [journal de développement](https://plugins.trac.wordpress.org/log/ip2location-variables/)
par [RSS](https://plugins.trac.wordpress.org/log/ip2location-variables/?limit=100&mode=stop_on_copy&format=rss).

## Journal des modifications

 * 2.9.9 Tested up to WordPress 6.9.
 * 2.9.8 Security fixes.
 * 2.9.7 Tested up to WordPress 6.8.
 * 2.9.6 Fixed CSRF vulnerabilities.
 * 2.9.5 Fixed web service validation error when insert both IP2Location and IP2Location.
   io keys.
 * 2.9.4 Tested up to WordPress 6.7.
 * 2.9.3 Sanitized input fields.
 * 2.9.2 Tested up to WordPress 6.6.
 * 2.9.1 Tested up to WordPress 6.5.1.
 * 2.9.0 Added ip2location.io web service support.
 * 2.8.7 Tested up to WordPress 6.4
 * 2.8.5 Fixed connection error.
 * 2.8.4 Tested up to WordPress 6.1.
 * 2.8.3 Tested up to WordPress 6.0.
 * 2.8.2 Enhanced checking.
 * 2.8.1 Tested up to WordPress 5.9.
 * 2.8.0 Added new address type and category fields.
 * 2.7.3 Tested up to WordPress 5.8.
 * 2.7.2 Tested up to WordPress 5.7.
 * 2.7.1 Tested up to WordPress 5.6.
 * 2.7.0 Minor bug fixes and added supports up to DB24.
 * 2.6.0 Updated file structures to use composer for IP2Location libraries.
 * 2.5.12 Tested with WordPress 5.5.
 * 2.5.11 Fixed parsing issues.
 * 2.5.10 Tested with WordPress 5.4.
 * 2.5.9 Increased download timeout.
 * 2.5.8 Fixed typo.
 * 2.5.7 Minor fixes.
 * 2.5.6 Added feedback request.
 * 2.5.5 Tested with WordPress 5.3.2.
 * 2.5.4 Fixed variable errors when result not found.
 * 2.5.3 Updated IP2Location library.
 * 2.5.2 Updated documentation links.
 * 2.5.1 Tested up to WordPress 5.1.1.
 * 2.5.0 Upgraded IP2Location API to v2.
 * 2.4.0 Added debug log.
 * 2.3.1 Minor changes.
 * 2.3.0 IP2Location database update changed to use download token.
 * 2.2.0 Able to lookup specific IP address.
 * 2.1.1 Fixed conflicts when multiple IP2Location plugins installed.
 * 2.1.0 Use IP2Location PHP 8.0.2 library for lookup.
 * 2.0.8 Use latest IP2Location library for lookup.
 * 2.0.7 Fixed close sticky information panel issue.
 * 2.0.6 Use latest IP2Location library and updated the setting page.
 * 2.0.5 Fixed error when creating admin option.
 * 2.0.4 Fixed uninstall hook warning message.
 * 2.0.3 Fixed uninstall hook.
 * 2.0.2 Fixed empty variable on first load.
 * 2.0.1 Tested with WordPress 4.4.
 * 2.0.0 Added suport to IP2Location Web Service. Rewrote the codes behind.
 * 1.1 Support automated bin download and server variables for IP2Location.
 * 1.0 Initial release

## Méta

 *  Version **2.9.9**
 *  Dernière mise à jour **il y a 6 mois**
 *  Installations actives **100+**
 *  Version de WordPress ** 2.0 ou plus **
 *  Testé jusqu’à **6.9.4**
 *  Langue
 * [English (US)](https://wordpress.org/plugins/ip2location-variables/)
 * Étiquettes
 * [geo-targeting](https://fr.wordpress.org/plugins/tags/geo-targeting/)[geolocation](https://fr.wordpress.org/plugins/tags/geolocation/)
   [ip2location](https://fr.wordpress.org/plugins/tags/ip2location/)[targeted content](https://fr.wordpress.org/plugins/tags/targeted-content/)
 *  [Vue avancée](https://fr.wordpress.org/plugins/ip2location-variables/advanced/)

## Évaluations

 2.3 sur 5 étoiles.

 *  [  1 avis à 5 étoile     ](https://wordpress.org/support/plugin/ip2location-variables/reviews/?filter=5)
 *  [  0 avis à 4 étoile     ](https://wordpress.org/support/plugin/ip2location-variables/reviews/?filter=4)
 *  [  0 avis à 3 étoile     ](https://wordpress.org/support/plugin/ip2location-variables/reviews/?filter=3)
 *  [  0 avis à 2 étoile     ](https://wordpress.org/support/plugin/ip2location-variables/reviews/?filter=2)
 *  [  2 avis à 1 étoiles     ](https://wordpress.org/support/plugin/ip2location-variables/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/ip2location-variables/reviews/#new-post)

[Voir tous les avis](https://wordpress.org/support/plugin/ip2location-variables/reviews/)

## Contributeurs

 *   [ IP2Location ](https://profiles.wordpress.org/ip2location/)

## Support

Quelque chose à dire ? Besoin d’aide ?

 [Voir le forum de support](https://wordpress.org/support/plugin/ip2location-variables/)

## Faire un don

Souhaitez-vous soutenir l’avancement de cette extension ?

 [ Faire un don à cette extension ](http://www.ip2location.com)