2011-07-13 23 views
0

我在尋找一個免費的API或Web服務,爲美國郵政編碼提供當前時間/本地時間。我想使用它的PHP應用程序。或者任何替代方案來實現我所尋找的東西也會非常有幫助。有一種服務可以根據經緯度提供當地時間,但還有其他問題,比如每天的點擊率等等。非常感謝您的幫助。請提出任何免費的美國ZIpcode到本地時間/當前時間的webserivce

回答

0

您可以使用http://www.worldweatheronline.com/time-zone-api.aspx你需要註冊一個免費的API密鑰,但除此之外,API是非常容易使用。

請求URL: -

http://www.worldweatheronline.com/feed/tz.ashx?key=xxxxxxxxxxxxxxxxx&q=SW1&format=xml

輸出: -

<?xml version="1.0" encoding="UTF-8"?> 
<data> 
    <request> 
    <type>UK Postcode</type> 
    <query>SW1</query> 
    </request> 
    <time_zone> 
    <localtime>2010-11-09 17:00</localtime> 
    <utcOffset>0</utcOffset> 
    </time_zone> 
</data> 
相關問題