geoip_database_info

(PECL geoip >= 0.2.0)

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

說(shuō)明

geoip_database_info(int $database = GEOIP_COUNTRY_EDITION): string

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

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

參數(shù)

database

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

返回值

如果成功,返回?cái)?shù)據(jù)庫(kù)的版本信息,錯(cuò)誤則返回null 。

范例

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

以下代碼將會(huì)輸出數(shù)據(jù)庫(kù)的相關(guān)信息。

<?php
print geoip_database_info(GEOIP_COUNTRY_EDITION);
?>

以上例程會(huì)輸出:

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