【发布时间】:2011-05-28 17:43:21
【问题描述】:
哪位朋友有任何代码,在api的帮助下我可以看到一周的天气更新,如果哪位朋友有任何教程,请给我..
它是为 iphone 或 php 实现的
谢谢
【问题讨论】:
哪位朋友有任何代码,在api的帮助下我可以看到一周的天气更新,如果哪位朋友有任何教程,请给我..
它是为 iphone 或 php 实现的
谢谢
【问题讨论】:
在php中是否使用google
查看链接 http://komunitasweb.com/2009/09/showing-the-weather-with-php-and-google-weather-api/
到 iphone 中查看旧问题:
https://stackoverflow.com/questions/1305127/free-weather-api
【讨论】:
这是一个 php 示例(注意:需要来自 openweathermap.org 的有效 API-KEY)
$url = 'http://api.openweathermap.org/data/2.5/forecast?q=London,us&mode=xml&appid=<API-KEY>'
$forecast = file_get_contents($url);
您可以通过城市名称、城市ID、经纬度等获取预报。
【讨论】: