geoip_database_info

(PECL geoip >= 0.2.0)

geoip_database_info獲取 GeoIP 數(shù)據(jù)庫的信息

說明

geoip_database_info(int $database = GEOIP_COUNTRY_EDITION): string

geoip_database_info() 函數(shù)返回 GeoIP 數(shù)據(jù)庫版本的信息。

如果無參調(diào)用該函數(shù),則返回 GeoIP 免費國家版的版本信息。

參數(shù)

database

該變量的類型為整型。你可以使用該擴展的預定義常量(類似: GEOIP_*_EDITION)。

返回值

如果成功,返回數(shù)據(jù)庫的版本信息,錯誤則返回null 。

范例

示例 #1 geoip_database_info() 函數(shù)的使用范例:

以下代碼將會輸出數(shù)據(jù)庫的相關信息。

<?php
print geoip_database_info(GEOIP_COUNTRY_EDITION);
?>

以上例程會輸出:

GEO-106FREE 20060801 Build 1 Copyright (c) 2006 MaxMind LLC All Rights Reserved