Home Plugins ip2country
Ip2country logo

Ip2country

by webvitaly on WordPress.org

Plugin converts IP-address to the country.

(0)
Ip2country table

Ip2country table

Get country code or country name:

country_code;
echo ' Country name: '.$ip2country->country_name;
// or
$ip2country2 = ip2country('212.113.46.148');
echo ' Country code: '.$ip2country2->country_code;
echo ' Country name: '.$ip2country2->country_name;
?>

Get additional info about the country by country code:

country_code);
echo ' iso_code_2: '.$ip2country_info->iso_code_2;
echo ' iso_code_3: '.$ip2country_info->iso_code_3;
echo ' iso_country: '.$ip2country_info->iso_country;
echo ' country: '.$ip2country_info->country;
echo ' lat: '.$ip2country_info->lat;
echo ' lon: '.$ip2country_info->lon;
// or
$ip2country_info = ip2country_info('us');
echo ' lat: '.$ip2country_info->lat;
echo ' lon: '.$ip2country_info->lon;
?>

Ip2country support page

Useful:

Active installations10+
Weekly downloads
8+14.29%
Version1.3
Last updated8/9/2020
WordPress version3.0
Tested up to5.4.16
Tags
countrygeolocationipip to countryip2country