任何朋友都可以有任何代码,在 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,纬度和经度等获取预测。