GeoIP plugin
-
This plugin might exist allready, but I couldn’t find using google, so here it is ??
The plugin gives you four functions you can use in your blog:
get_geoip_country_code and get_geoip_country_name returns the the visitors country code / name
the_geoip_country_code and the_geoip_country_name echos the the visitors country code / name
INSTALLATION:
1) Extract the plugin into your WordPress plugins directory.
2) Download the free GeoIP country database from MaxMind , and extract it into your plugins/GeoIP directory
3) Optional, If you need country flags, you’ll find them here: https://www.maxmind.com/download/geoip/database/flag.zip
4) Activate it on the Plugins tab of the WordPress admin console.
SAMPLE USE:
<img src="/flag/<?php echo strtolower(get_geoip_country_code())?>.gif" alt="<?php the_geoip_country_name()?>" />
NOTE, If you have full access to your server and it’s running Apache, you should take a look at the mod_geoip
- The topic ‘GeoIP plugin’ is closed to new replies.