0

Is there a way to figure out the IP ranges for a certain country code without using MaxMind or IP2Location where in both they provide a binary file where one have to check single IP at a time

both source do not provide a way to list the ranges for a certain country

Weed Cookie
  • 579
  • 1
  • 3
  • 11

1 Answers1

0

They do provide data files in CSV / text format. See example below.

https://www.ip2location.com/samples/db1-ip-country.txt

Michael C.
  • 1,410
  • 1
  • 9
  • 20
  • In this approach one would have to check a single IP against the that file at a time you can retrieve the whole range without parsing that file into some dictionary that has a country and the IP ranges for that single country – Weed Cookie Dec 16 '22 at 09:35