(PECL geoip >= 1.0.1)
geoip_db_avail — Determine if GeoIP Database is available
geoip_db_avail ( int $database ) : bool
The geoip_db_avail() function returns if the corresponding GeoIP Database is available and can be opened on disk.
It does not indicate if the file is a proper database, only if it is readable.
database
The database type as an integer. You can use the various constants defined with this extension (ie: GEOIP_*_EDITION).
Returns true
is database exists, false
if not found, or null
on error.
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.geoip-db-avail.php