GeoIP Functions
Úvod
The GeoIP extension allows you to find the location of an IP address. City, State, Country, Longitude, Latitude, and other information as all, such as ISP and connection type can be obtained with the help of GeoIP.
Požiadavky
This extension requires the GeoIP C library version 1.4.0 or higher to be installed. You can grab the latest version from » https://www.maxmind.com/app/c and compile it yourself.
By default, you will only have access to the Free GeoIP Country or GeoLite City databases. While this module can work with other types of database, you must buy a commercial license from » Maxmind.
Inštalácia
Toto » PECL rozšírenie nie je pribalené s PHP.
Dodatočné informácie ako sú nové vydania, downloady, zdrojové súbory, informácie od spracovávateľa, a CHANGELOG, je možné nájsť tu: » https://pecl.php.net/package/geoip.
Typy zdrojov
Toto rozšírenie nemá definované žiadne typy zdrojov.
Preddefinované Konštanty
Konštanty uvedené nižšie sú definované týmto rozšírením a budú dostupné iba keď rozšírenie bolo buď kompilované do PHP alebo dynamicky načítané za behu (runtime).
- GEOIP_COUNTRY_EDITION (integer)
- GEOIP_REGION_EDITION_REV0 (integer)
- GEOIP_CITY_EDITION_REV0 (integer)
- GEOIP_ORG_EDITION (integer)
- GEOIP_ISP_EDITION (integer)
- GEOIP_CITY_EDITION_REV1 (integer)
- GEOIP_REGION_EDITION_REV1 (integer)
- GEOIP_PROXY_EDITION (integer)
- GEOIP_ASNUM_EDITION (integer)
- GEOIP_NETSPEED_EDITION (integer)
- GEOIP_DOMAIN_EDITION (integer)
The following constants are for net speed:
Table of Contents
- geoip_country_code_by_name — Get the two letter country code
- geoip_country_code3_by_name — Get the three letter country code
- geoip_country_name_by_name — Get the full country name
- geoip_database_info — Get GeoIP Database information
- geoip_db_avail — Determine if GeoIP Database is available
- geoip_db_filename — Returns the filename of the corresponding GeoIP Database
- geoip_db_get_all_info — Returns detailed informations about all GeoIP database types
- geoip_id_by_name — Get the Internet connection speed
- geoip_isp_by_name — Get the Internet Service Provider (ISP) name
- geoip_org_by_name — Get the organization name
- geoip_record_by_name — Returns the detailed City information found in the GeoIP Database
- geoip_region_by_name — Get the country code and region