note 99450 added to function.geoip-db-filename
| From: | Locd' | Date: | Wed, 18 Aug 2010 12:50:31 +0000 |
| Subject: | note 99450 added to function.geoip-db-filename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171796@lists.php.net to get a copy of this message | ||
To quickly know which databases are available on your system:
<?php
$cst = array(
'GEOIP_COUNTRY_EDITION' => GEOIP_COUNTRY_EDITION,
'GEOIP_REGION_EDITION_REV0' => GEOIP_REGION_EDITION_REV0,
'GEOIP_CITY_EDITION_REV0' => GEOIP_CITY_EDITION_REV0,
'GEOIP_ORG_EDITION' => GEOIP_ORG_EDITION,
'GEOIP_ISP_EDITION' => GEOIP_ISP_EDITION,
'GEOIP_CITY_EDITION_REV1' => GEOIP_CITY_EDITION_REV1,
'GEOIP_REGION_EDITION_REV1' => GEOIP_REGION_EDITION_REV1,
'GEOIP_PROXY_EDITION' => GEOIP_PROXY_EDITION,
'GEOIP_ASNUM_EDITION' => GEOIP_ASNUM_EDITION,
'GEOIP_NETSPEED_EDITION' => GEOIP_NETSPEED_EDITION,
'GEOIP_DOMAIN_EDITION' => GEOIP_DOMAIN_EDITION,
);
foreach ($cst as $k=>$v) {
echo $k.': '.geoip_db_filename($v).' '.(geoip_db_avail($v) ?
'Available':'').'<br>';
}
?>
The only drawback of the PECL extension with respect to a pure PHP implementation is that you cannot
select yourself where the database is. So, if you get a new version of the database, you need to put
in the standard place and you may need root access to do so.
----
Server IP: 69.147.83.197
Probable Submitter: 84.180.190.107
----
Manual Page -- http://www.php.net/manual/en/function.geoip-db-filename.php
Edit -- https://master.php.net/note/edit/99450
Del: integrated -- https://master.php.net/note/delete/99450/integrated
Del: useless -- https://master.php.net/note/delete/99450/useless
Del: bad code -- https://master.php.net/note/delete/99450/bad+code
Del: spam -- https://master.php.net/note/delete/99450/spam
Del: non-english -- https://master.php.net/note/delete/99450/non-english
Del: in docs -- https://master.php.net/note/delete/99450/in+docs
Del: other reasons-- https://master.php.net/note/delete/99450
Reject -- https://master.php.net/note/reject/99450
Search -- https://master.php.net/manage/user-notes.php