PHP.nl

geoip_db_filename

geoip_db_filename

Returns the filename of the corresponding GeoIP Database

string **geoip_db_filename** int $database

The function returns the filename of the corresponding GeoIP Database. geoip_db_filename

It does not indicate if the file exists or not on disk, only where the library is looking for the database.

database The database type as an integer. You can use the defined with this extension (ie: GEOIP_*_EDITION). various constants

Returns the filename of the corresponding database, or null on error.

Voorbeeld: A example

This will output the filename of the corresponding database.

<?php

print geoip_db_filename(GEOIP_COUNTRY_EDITION);

?>
/usr/share/GeoIP/GeoIP.dat