perl
perl copied to clipboard
Official Perl client library for IPinfo API (IP geolocation and other types of IP data)
Create a simple function that accepts an IP list (max 500k) and returns the JSON response from `https://ipinfo.io/tools/map`. See the web page on https://ipinfo.io/tools/map for more details.
The `field` routine uses `valid_fields` to determine what a valid field is, and some of the paid fields aren't included in there, so we should add them to it.
The library essentially queries `https://ipinfo.io//geo` when we call the function without an IP input, and this endpoint (with the 2 slashes before `geo`) gives a 404. Likely we changed this...
Make sure the cache key contains a number to indicate the version of the cached data. Data changes that change what's expected in cached data require a version change.
I try to execute the following example present in the documentation: ``` use Geo::IPinfo; $ipinfo = Geo::IPinfo->new(); $details = $ipinfo->info('8.8.8.8'); if (defined $details) # valid data returned { $city =...
https://ipinfo.io/developers/batch Take into account use cases like https://github.com/ipinfo/python/issues/35 to ensure batch ops support is scalable & robust.
https://ipinfo.io/ip-abuse-contact-api https://ipinfo.io/developers/hosted-domains https://ipinfo.io/developers/privacy