Query: geoip_region_name_by_code
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GEOIP_REGION_NAME_BY_CODE(3) 1 GEOIP_REGION_NAME_BY_CODE(3) geoip_region_name_by_code - Returns the region name for some country and region code comboSYNOPSISstring geoip_region_name_by_code (string $country_code, string $region_code)DESCRIPTIONThe geoip_region_name_by_code(3) function will return the region name corresponding to a country and region code combo. In the United States, the region code corresponds to the two-letter abbreviation of each state. In Canada, the region code corresponds to the two-letter province or territory code as attributed by Canada Post. For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions. You can check http://www.maxmind.com/app/fips10_4 for a detailed list of FIPS 10-4 codes. This function is always available if using GeoIP Library version 1.4.1 or newer. The data is taken directly from the GeoIP Library and not from any database.PARAMETERSo $country_code - The two-letter country code (see geoip_country_code_by_name(3)) o $region_code - The two-letter (or digit) region code (see geoip_region_by_name(3))RETURN VALUESReturns the region name on success, or FALSE if the country and region code combo cannot be found.EXAMPLESExample #1 A geoip_region_name_by_code(3) example using region code for US/Canada This will print the region name for country CA (Canada), region QC (Quebec). <?php $region = geoip_region_name_by_code('CA', 'QC'); if ($region) { echo 'Region name for CA/QC is: ' . $region; } ?> The above example will output: Region name for CA/QC is: Quebec Example #2 A geoip_region_name_by_code(3) example using FIPS codes This will print the region name for country JP (Japan), region 01. <?php $region = geoip_region_name_by_code('JP', '01'); if ($region) { echo 'Region name for JP/01 is: ' . $region; } ?> The above example will output: Region name for JP/01 is: Aichi PHP Documentation Group GEOIP_REGION_NAME_BY_CODE(3)
Related Man Pages |
---|
xintersectregion(3) - debian |
xsubtractregion(3) - debian |
xunionrectwithregion(3) - debian |
xintersectregion(3) - centos |
geoip_time_zone_by_country_and_region(3) - php |
Similar Topics in the Unix Linux Community |
---|
Finding how done IT |
shell script |
awk -- sort out the out put file |
how many are these ..? |
help needed to put instance numbers |