(PECL geoip >= 1.0.4)
geoip_time_zone_by_country_and_region — 锟斤拷锟截癸拷锟揭和碉拷锟斤拷锟斤拷时锟斤拷
$country_code
[, string $region_code
] ) : stringgeoip_time_zone_by_country_and_region() 锟斤拷锟斤拷锟斤拷锟结返锟斤拷锟斤拷锟斤拷一锟斤拷叩锟斤拷锟斤拷锟斤拷应锟斤拷时锟斤拷锟斤拷
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷每锟斤拷锟捷讹拷应锟斤拷锟斤拷锟斤拷锟斤拷母锟斤拷锟斤拷写锟斤拷锟斤拷锟节硷拷锟矫达拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷母锟斤拷傻锟矫匡拷锟绞★拷锟斤拷锟斤拷锟斤拷锟斤拷搿�
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷GeoIP 使锟斤拷 FIPS 锟斤拷锟斤拷锟斤拷10锟斤拷4位锟侥达拷锟斤拷锟斤拷锟斤拷示锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷缘锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 » http://www.maxmind.com/app/fips10_4 锟介看锟斤拷细锟斤拷息锟斤拷
锟矫猴拷锟斤拷只锟斤拷 GeoIP 1.4.1锟芥本锟斤拷锟较的匡拷趴锟斤拷谩锟斤拷锟斤拷医锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷源锟斤拷直锟接达拷 GeoIP 锟斤拷锟叫伙拷取锟侥o拷锟斤拷锟斤拷锟角达拷锟轿猴拷锟斤拷锟捷匡拷锟叫★拷
country_code
锟斤拷锟斤拷锟斤拷锟斤拷母锟斤拷傻墓锟斤拷掖锟斤拷锟� (锟轿硷拷 geoip_country_code_by_name())
region_code
锟斤拷锟斤拷锟斤拷锟斤拷母锟斤拷傻牡锟斤拷锟斤拷锟斤拷锟� (锟轿硷拷 geoip_region_by_name())
锟缴癸拷锟斤拷锟斤拷锟截碉拷锟斤拷锟斤拷锟街o拷锟斤拷锟斤拷锟斤拷锟斤拷息未锟揭碉拷锟津返伙拷 FALSE
锟斤拷
Example #1 geoip_time_zone_by_country_and_region() 使锟斤拷锟斤拷锟斤拷锟酵硷拷锟矫达拷锟斤拷锟斤拷姆锟斤拷锟斤拷锟�
锟斤拷锟斤拷锟斤拷锟教斤拷锟斤拷锟接★拷锟斤拷壹锟斤拷为 CA (锟斤拷锟矫达拷)锟斤拷锟斤拷锟斤拷锟斤拷锟轿� QC (锟斤拷锟斤拷锟斤拷)锟斤拷时锟斤拷锟斤拷
<?php
$timezone = geoip_time_zone_by_country_and_region('CA', 'QC');
if ($timezone) {
echo 'Time zone for CA/QC is: ' . $timezone;
}
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
Time zone for CA/QC is: America/Montreal
Example #2 geoip_time_zone_by_country_and_region() 使锟斤拷 FIPS 锟斤拷锟斤拷姆锟斤拷锟斤拷锟�
锟斤拷锟斤拷锟斤拷锟教斤拷锟斤拷锟接★拷锟斤拷壹锟斤拷为 JP (锟秸憋拷),锟斤拷锟斤拷锟斤拷锟斤拷为 01锟斤拷时锟斤拷锟斤拷
<?php
$timezone = geoip_time_zone_by_country_and_region('JP', '01');
if ($timezone) {
echo 'Time zone for JP/01 is: ' . $timezone;
}
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
Time zone for JP/01 is: Asia/Tokyo