一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

php使用百度天氣接口示例

注意地區要轉碼的
百度ak申請地址:http://lbsyun.baidu.com/apiconsole/key

復制代碼 代碼如下:
<?php

$city="嘉興";
$content = file_get_contents("http://api.map.baidu.com/telematics/v3/weather?location=%E5%98%89%E5%85%B4&output=json&ak=5slgyqGDENN7Sy7pw29IUvrZ");
print_r(json_decode($content));

復制代碼 代碼如下:
{
    error: 0,
    status: "success",
    date: "2014-04-18",
    results: [
        {
            currentCity: "嘉興",
            weather_data: [
                {
                    date: "今天(周三)",
                    dayPictureUrl: "http://api.map.baidu.com/images/weather/day/duoyun.png",
                    nightPictureUrl: "http://api.map.baidu.com/images/weather/night/duoyun.png",
                    weather: "多云",
                    wind: "微風",
                    temperature: "23℃"
                },
                {
                    date: "明天(周四)",
                    dayPictureUrl: "http://api.map.baidu.com/images/weather/day/leizhenyu.png",
                    nightPictureUrl: "http://api.map.baidu.com/images/weather/night/zhongyu.png",
                    weather: "雷陣雨轉中雨",
                    wind: "微風",
                    temperature: "29~22℃"
                },
                {
                    date: "后天(周五)",
                    dayPictureUrl: "http://api.map.baidu.com/images/weather/day/yin.png",
                    nightPictureUrl: "http://api.map.baidu.com/images/weather/night/duoyun.png",
                    weather: "陰轉多云",
                    wind: "微風",
                    temperature: "31~23℃"
                },
                {
                    date: "大后天(周六)",
                    dayPictureUrl: "http://api.map.baidu.com/images/weather/day/duoyun.png",
                    nightPictureUrl: "http://api.map.baidu.com/images/weather/night/duoyun.png",
                    weather: "多云",
                    wind: "微風",
                    temperature: "31~24℃"
                }
            ]
        },
        {
            currentCity: "合肥市",
            weather_data: [
                {
                    date: "今天(周三)",
                    dayPictureUrl: "http://api.map.baidu.com/images/weather/day/duoyun.png",
                    nightPictureUrl: "http://api.map.baidu.com/images/weather/night/duoyun.png",
                    weather: "多云",
                    wind: "東風3-4級",
                    temperature: "27℃"
                },
                {
                    date: "明天(周四)",
                    dayPictureUrl: "http://api.map.baidu.com/images/weather/day/duoyun.png",
                    nightPictureUrl: "http://api.map.baidu.com/images/weather/night/duoyun.png",
                    weather: "多云",
                    wind: "東北風3-4級",
                    temperature: "35~27℃"
                },
                {
                    date: "后天(周五)",
                    dayPictureUrl: "http://api.map.baidu.com/images/weather/day/duoyun.png",
                    nightPictureUrl: "http://api.map.baidu.com/images/weather/night/duoyun.png",
                    weather: "多云",
                    wind: "南風",
                    temperature: "35~27℃"
                },
                {
                    date: "大后天(周六)",
                    dayPictureUrl: "http://api.map.baidu.com/images/weather/day/duoyun.png",
                    nightPictureUrl: "http://api.map.baidu.com/images/weather/night/duoyun.png",
                    weather: "多云",
                    wind: "東風",
                    temperature: "34~27℃"
                }
            ]
        }
    ]
}

php技術php使用百度天氣接口示例,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 亚洲大片免费观看 | 狠狠五月深爱婷婷网 | 国产精品露脸国语对白手机视频 | 六月婷婷在线观看 | 色老板在线视频一区二区 | 国产在线视频91 | 久久精品中文字幕极品 | 色综合久久88色综合天天 | 美女大胸又爽又黄网站 | 国产小视频在线观看免费 | 99热精品成人免费观看 | 国产一区在线观看免费 | 国产精品久久久久久福利 | 女人笫一次一级毛片 | 国产成人啪精品午夜在线播放 | 午夜免费大片 | 久久久久久久久久福利 | 国产视频精品久久 | 国产在线美女 | 日韩精品一区二区三区四区 | 一区二区视频在线观看高清视频在线 | 青青草国产青春综合久久 | 国产精品九九视频 | 日韩精品中文字幕视频一区 | 日本精品一区二区三区视频 | 91福利精品老师国产自产在线 | 禁断の肉体乱爱中文字幕欧 | 久久精品5| 91视频影院 | 午夜精品乱人伦小说区 | 91麻豆高清国产在线播放 | 国产色拍 | 精品中文字幕一区二区三区四区 | 日本精品一区二区三区视频 | 2021色噜噜狠狠综曰曰曰 | 日本一区二区免费看 | 亚洲国产一区二区三区最新 | 欧美一级特黄特黄做受 | 狠狠色噜噜狠狠狠狠2021天天 | 九九久久免费视频 | 91精品在线免费视频 |