array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), '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' => 'ja', '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 Free Country Edition のバージョンを返します。
対応するデータベースのバージョン、あるいはエラー時に 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