From 43a0976de099e091e242ae1c9ea454a54d9dc09a Mon Sep 17 00:00:00 2001 From: Olivier Hill Date: Tue, 23 Dec 2008 21:26:50 +0000 Subject: [PATCH] Documentation for new GeoIP functions git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@271778 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/geoip-region-name-by-code.xml | 139 ++++++++++++++++++ .../geoip-time-zone-by-country-and-region.xml | 139 ++++++++++++++++++ reference/geoip/versions.xml | 4 +- 3 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 reference/geoip/functions/geoip-region-name-by-code.xml create mode 100644 reference/geoip/functions/geoip-time-zone-by-country-and-region.xml diff --git a/reference/geoip/functions/geoip-region-name-by-code.xml b/reference/geoip/functions/geoip-region-name-by-code.xml new file mode 100644 index 0000000000..38b54c2878 --- /dev/null +++ b/reference/geoip/functions/geoip-region-name-by-code.xml @@ -0,0 +1,139 @@ + + + + + geoip_region_name_by_code + Returns the region name for some country and region code combo + + + &reftitle.description; + + stringgeoip_region_name_by_code + stringcountry_code + stringregion_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 &url.maxmind.fips; + 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. + + + + &reftitle.parameters; + + + + country_code + + + The two-letter country code (see + geoip_country_code_by_name) + + + + + region_code + + + The two-letter (or digit) region code (see + geoip_region_by_name) + + + + + + + + &reftitle.returnvalues; + + Returns the region name on success, or &false; if the country and region code + combo cannot be found. + + + + + &reftitle.examples; + + + A <function>geoip_region_name_by_code</function> example using region code for US/Canada + + This will print the region name for country CA (Canada), region QC (Quebec). + + + +]]> + + &example.outputs; + + + + + + A <function>geoip_region_name_by_code</function> example using FIPS codes + + This will print the region name for country JP (Japan), region 01. + + + +]]> + + &example.outputs; + + + + + + + + + + diff --git a/reference/geoip/functions/geoip-time-zone-by-country-and-region.xml b/reference/geoip/functions/geoip-time-zone-by-country-and-region.xml new file mode 100644 index 0000000000..cd61dcc921 --- /dev/null +++ b/reference/geoip/functions/geoip-time-zone-by-country-and-region.xml @@ -0,0 +1,139 @@ + + + + + geoip_time_zone_by_country_and_region + Returns the time zone for some country and region code combo + + + &reftitle.description; + + stringgeoip_time_zone_by_country_and_region + stringcountry_code + stringregion_code + + + + The geoip_time_zone_by_country_and_region function will return the + time zone 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 &url.maxmind.fips; + 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. + + + + &reftitle.parameters; + + + + country_code + + + The two-letter country code (see + geoip_country_code_by_name) + + + + + region_code + + + The two-letter (or digit) region code (see + geoip_region_by_name) + + + + + + + + &reftitle.returnvalues; + + Returns the time zone on success, or &false; if the country and region code + combo cannot be found. + + + + + &reftitle.examples; + + + A <function>geoip_time_zone_by_country_and_region</function> example using region code for US/Canada + + This will print the time zone for country CA (Canada), region QC (Quebec). + + + +]]> + + &example.outputs; + + + + + + A <function>geoip_time_zone_by_country_and_region</function> example using FIPS codes + + This will print the time zone for country JP (Japan), region 01 (Aichi). + + + +]]> + + &example.outputs; + + + + + + + + + + diff --git a/reference/geoip/versions.xml b/reference/geoip/versions.xml index d983b2a3c8..486f852fe7 100644 --- a/reference/geoip/versions.xml +++ b/reference/geoip/versions.xml @@ -1,5 +1,5 @@ - + @@ -17,6 +17,8 @@ + +