0

这是来自的回报http://smart-ip.net/geoip-json/178.44.164.112

{"source":"smart-ip.net","host":"178.44.164.112","lang":"en","countryName":"Russia","countryCode":"RU","city" :"Orenburg","re​​gion":"Orenburg","latitude":"51.7227","longitude":"55.3637", "timezone":"Europe/Samara" }

这是类似服务的回报http://freegeoip.net/json/178.44.164.112

{"ip":"178.44.164.112","country_code":"RU","country_name":"俄罗斯联邦","re​​gion_code":"30","re​​gion_name":"哈巴罗夫斯克","city":"奥伦堡","zipcode":"","latitude":53.3,"longitude":141.4667,"metro_code":"","areacode":""}

smart-ip.net 服务为我提供了一个时区(用于 PHP 的 set_timezone)。然而,Freegeoip 没有。有没有办法使用freegeoip的数据来获取用户的时区?

4

1 回答 1

0

freegeoip.net 似乎没有时区数据。但是,您可以使用此处描述的方法之一获取纬度和经度并查找时区。

于 2013-09-25T15:31:26.547 回答