nasa / sitepod

A Sitemap Generator written in PHP
GNU General Public License v3.0
24 stars 16 forks source link

FreeGeoIP API has been deprecated and moved to ipstack.com #39

Closed dlackty closed 5 years ago

dlackty commented 6 years ago

However, ipstack requires auth key to call the API. One alternative is Snoopi.io, but its API rate limit is very low (2/sec).

lewismc commented 6 years ago

Hi @dlackty thanks for registering this. Are you using Sitepod? If so, can you propose a patch which makes the upgrade?

lewismc commented 6 years ago

The offending Sitepod code can be found at https://github.com/nasa/sitepod/blob/2a98c46d19c182e92ab20c06d902a0c748a4d4fb/src/Sitepod/GeoIp.php

Documentation on upgrading to ipstack.com can be found at https://github.com/apilayer/freegeoip#required-changes-to-legacy-integrations-freegeoipnetjsonxml It looks like you can make 10,000 free requests per month so I suspect that this is good enough for the time being.

lewismc commented 6 years ago

Essentially all we would need to

  1. add documentation notifying the user that they need to open an account and obtain an API key
  2. get the user to create a local file, possibly read from ~/.sitepod or something which contains the API key
  3. read the API key are runtime, possibly caching it for future use...