- Issue created by @Maeglin
- πΊπΈUnited States bluegeek9
I think it will need to be separate modules; city and country and maybe a third for shared code.
Can you tell me more about how you are using the country database? Are you using the file or do you load the data into a database?
- πΊπΈUnited States Maeglin
I download the country database in 2 formats, CSV and MMDB. The latter is mainly for software that uses it, but the former I convert to MaxMind's old binary format, for older software that might still need it, as well as convert it to a different format altogether for firewall purposes. There's an iptables extension for GeoIP-based filtering, but it requires the data in its own special format.
- πΊπΈUnited States bluegeek9
I will add a parameter to define the scope: country or city. If no scope is provided, the default will be used.
So, in MaxMind if the default is set to Country, the Visitiors will get Country data.
public function getLocation(string $ip, ?string $scope = null)