Any Good Geo targeting Pop up plugin

cybermeid

Regular Member
Joined
May 22, 2010
Messages
355
Reaction score
30
I want a popup plugin like WP super popup which will pop up when someone visits only from certain country and I want it to be disabled for all other countries which I dont want them to see the subscribe button.
Thanks
 
Take a look at maxmind's API. It's not a plugin, but you can place where you'd need it to be called from.
Code:
http://www.maxmind.com/app/php

once you place the required files on the server you'd make a call like this:
PHP:
include('geoip.inc');
$gi = geoip_open('GeoIP.dat');
$country = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
if($county == 'US'){
echo "<code for button>";
}elseif($country == 'UK'){
echo "something else for the UK";
}else{
echo "something else for everyone else";
}
 
Back
Top