update : 2015.11.03
php.shukuma.com검색:
|
geoip_region_name_by_code(PECL geoip >= 1.0.4) geoip_region_name_by_code — Returns the region name for some country and region code combo 설명
string geoip_region_name_by_code
( string
$country_code
, string $region_code
)The geoip_region_name_by_code() 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. 인수
반환값
Returns the region name on success, or 예제
Example #1 A geoip_region_name_by_code() example using region code for US/Canada This will print the region name for country CA (Canada), region QC (Quebec).
<?php 위 예제의 출력: Region name for CA/QC is: Quebec Example #2 A geoip_region_name_by_code() example using FIPS codes This will print the region name for country JP (Japan), region 01.
<?php 위 예제의 출력: Region name for JP/01 is: Aichi |