Skip to content

Instantly share code, notes, and snippets.

@J0s3f
Last active May 9, 2018 07:27
Show Gist options
  • Save J0s3f/6fba3168b9af65d7528e to your computer and use it in GitHub Desktop.
Save J0s3f/6fba3168b9af65d7528e to your computer and use it in GitHub Desktop.
extreme-ip-lookup.com as alternative to geoplugin
<script type="text/javascript">function setupGeo(o) {
window.geoplugin_request = function() { return o.ip; };
window.geoplugin_status = function() { return '200'; };
window.geoplugin_city = function() { return o.city; };
window.geoplugin_region = function() {return o.region_name; };
window.geoplugin_countryCode = function() { return o.country_code; };
window.geoplugin_countryName = function() { return o.country_name; };
window.geoplugin_latitude = function() { return o.latitude; };
window.geoplugin_longitude = function() { return o.longitude; };
}</script>
<script type="text/javascript" src="//freegeoip.net/json/?callback=setupGeo"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment