【问题标题】:weather api, api for iphone, api for php天气 api,iphone 的 api,php 的 api
【发布时间】:2011-05-28 17:43:21
【问题描述】:

哪位朋友有任何代码,在api的帮助下我可以看到一周的天气更新,如果哪位朋友有任何教程,请给我..

它是为 iphone 或 php 实现的

谢谢

【问题讨论】:

    标签: api weather


    【解决方案1】:

    【讨论】:

    • 你的意思是 php ?您可以在链接中看到示例,使用 xpath
    【解决方案2】:

    这是一个 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、经纬度等获取预报。

    【讨论】:

      猜你喜欢
      • 2011-10-02
      • 1970-01-01
      • 2011-12-09
      • 2011-01-30
      • 1970-01-01
      • 2021-08-07
      • 2015-02-22
      • 2012-01-13
      • 1970-01-01
      相关资源
      最近更新 更多