- Nov 12, 2012
- 1,560
- 893
Hello,
I am trying to re-use an old script from Cpaclickz which is using the Maxmind old API.
The code that the script uses is :
Now there is a new API v2 form Maxmind :
https://dev.maxmind.com/geoip/geoip2/javascript/
https://dev.maxmind.com/geoip/geoip2/javascript/tutorial/
Need help to remake the old code to work with the new API.
Any help is appreciated.
I am trying to re-use an old script from Cpaclickz which is using the Maxmind old API.
The code that the script uses is :
Code:
<script src="http://j.maxmind.com/app/country.js" charset="ISO-8859-1" type="text/javascript"></script>
<script type='text/javascript'>
var visitorCountry = geoip_country_code;
document.write('<scr'+'ipt src="redirect.php?code=<?php echo "$campaign_code"; ?>&sid=<?php echo "$sid"; ?>&geo='+visitorCountry+'" type="text/javascript"><\/scr'+'ipt>');
</script>
Now there is a new API v2 form Maxmind :
https://dev.maxmind.com/geoip/geoip2/javascript/
https://dev.maxmind.com/geoip/geoip2/javascript/tutorial/
Need help to remake the old code to work with the new API.
Any help is appreciated.