Closed Huji closed 4 years ago
For instance, when you call $reader->asn( '8.8.8.8' );
you currently get results like this:
GeoIp2\Model\Asn Object
(
[autonomousSystemNumber:protected] => 15169
[autonomousSystemOrganization:protected] => Google Inc.
[ipAddress:protected] => 8.8.8.8
[raw:protected] => Array
(
[autonomous_system_number] => 15169
[autonomous_system_organization] => Google Inc.
[ip_address] => 8.8.8.8
)
)
But desired results are like this:
GeoIp2\Model\Asn Object
(
[autonomousSystemNumber:protected] => 15169
[autonomousSystemOrganization:protected] => Google Inc.
[ipAddress:protected] => 8.8.8.8
[network:protected] => 8.8.8.0/24
[raw:protected] => Array
(
[autonomous_system_number] => 15169
[autonomous_system_organization] => Google Inc.
[ip_address] => 8.8.8.8
[network] => 8.8.8.0/24
)
)
I would suggest that you direct this to support@maxmind.com as this would likely be changed at the database level rather than the library level.
Email sent. Will report back once I receive a response.
For the record, I am not familiar with the MMDB format, but in the CSV format the network
variable is already available as the first column in the ASN file.
Currently, the ASN model returns only two values:
autonomous_system_number
andautonomous_system_organization
. It should, however, return thenetwork
value (aka the IP subnet) as well. Some ASOs have multiple subnets, and it is needed to know which IP belongs to which one of those subnets.