Home > PHP > Function > GeoIP > geoip_db_avail()

geoip_db_avail()

geoip_db_avail - Determine if GeoIP Database is available

Syntax

bool geoip_db_avail (int $database)

Arguments

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

Description

The geoip_db_avail() function returns if the corresponding GeoIP Database is available and can be opened on disk.

Version

PHP PECL geoip >= 1.0.1

Return value

Returns TRUE is database exists, FALSE if not found, or NULL on error.