array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.geoip-database-info.php', 1 => 'geoip_database_info', ), 'up' => array ( 0 => 'ref.geoip.php', 1 => 'GeoIP 函数', ), 'prev' => array ( 0 => 'function.geoip-country-name-by-name.php', 1 => 'geoip_country_name_by_name', ), 'next' => array ( 0 => 'function.geoip-db-avail.php', 1 => 'geoip_db_avail', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/geoip/functions/geoip-database-info.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL geoip >= 0.2.0)
geoip_database_info — 获取 GeoIP 数据库的信息
geoip_database_info() 函数返回 GeoIP 数据库版本的信息。
如果无参调用该函数,则返回 GeoIP 免费国家版的版本信息。
如果成功,返回数据库的版本信息,错误则返回null
。
示例 #1 geoip_database_info() 函数的使用范例:
以下代码将会输出数据库的相关信息。
<?php
print geoip_database_info(GEOIP_COUNTRY_EDITION);
?>
以上示例会输出:
GEO-106FREE 20060801 Build 1 Copyright (c) 2006 MaxMind LLC All Rights Reserved