Class Reader
Instances of this class provide a reader for the MaxMind DB format. IP
addresses can be looked up using the get
method.
Methods summary
public
|
#
__construct( string $database )
Constructs a Reader for the MaxMind DB format. The file passed to it must be
a valid MaxMind DB file such as a GeoIp2 database file.
Constructs a Reader for the MaxMind DB format. The file passed to it must be
a valid MaxMind DB file such as a GeoIp2 database file.
Parameters
- $database
- the MaxMind DB file to use
Throws
|
public
array
|
#
get( string $ipAddress )
Looks up the address in the MaxMind DB.
Looks up the address in the MaxMind DB.
Parameters
- $ipAddress
- the IP address to look up
Returns
array the record for the IP address
Throws
|
public
MaxMind\Db\Reader\Metadata
|
|
public
|
#
close( )
Closes the MaxMind DB and returns resources to the system.
Closes the MaxMind DB and returns resources to the system.
Throws
|