« geoip_country_name_by_name
geoip_db_avail »

geoip_database_info

(PECL geoip >= 0.2.0)

geoip_database_info — GeoIP データベースの情報を取得する

説明

function geoip_database_info(int $database = GEOIP_COUNTRY_EDITION): string

geoip_database_info() 関数は、 GeoIP データベースのバージョンを返します。 このバージョンはバイナリファイルの内部で定義されています。

この関数を引数なしでコールすると、GeoIP Free Country Edition のバージョンを返します。

パラメータ

database

データベースの型を整数値で指定します。この拡張モジュールで定義されている さまざまな定数 (例: GEOIP_*_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
関連キーワード:
geoip   database   データベース   GeoIP   info   country   avail   バイナリファイル   内部   Free   Country   Edition   整数   拡張   定数   print   Build   MaxMind
関連する関数・ページ:
function.geoip-db-avail   function.geoip-db-filename   function.geoip-db-get-all-info   ref.geoip   book.geoip   function.geoip-setup-custom-directory