新浪天气预报API
http://php.weather.sina.com.cn/xml.php?city=%B1%B1%BE%A9&password=DJOYnieT8234jlsK&day=0
http://php.weather.sina.com.cn/xml.php?city=%B1%B1%BE%A9&password=DJOYnieT8234jlsK&day=0
其中,city后的城市转码。
Password固定
Day为0表示当天天气,1表示第二天的天气,2表示第三天的天气,以此类推,最大为4
返回的XML为
说明:
<Profiles>
<Weather>
<city>北京</city>
<status1>晴</status1>
<status2>晴</status2>
<figure1>qing</figure1>
<figure2>qing</figure2>
<direction1>无持续风向</direction1>
<direction2>无持续风向</direction2>
<power1>≤3</power1>
<power2>≤3</power2>
<temperature1>7</temperature1>
<temperature2>-5</temperature2>
<ssd>0</ssd>
<tgd1>7</tgd1>
<tgd2>7</tgd2>
<zwx>2</zwx>
<ktk>7</ktk>
<pollution>3</pollution>
<xcz></xcz>
<zho></zho>
<diy></diy>
<fas></fas>
<chy>6</chy>
<zho_shuoming>暂无</zho_shuoming>
<diy_shuoming>暂无</diy_shuoming>
<fas_shuoming>暂无</fas_shuoming>
<chy_shuoming>棉衣、冬大衣、皮夹克、内着衬衫或羊毛内衣、毛衣、外罩大衣</chy_shuoming>
<pollution_l>一般</pollution_l>