客户需要权威的。。。。。
网上搜索了一下,有几个提供的webservice都说是数据来源是中国气象局(http://www.cma.gov.cn/tqyb/);
还有人说中国气象局有提供 天气预报的webservice, 但是我找了半天没有找到。。。。
有没有知道的?麻烦告知一下,谢谢
------解决方案--------------------
http://www.congci.com/
http://www.congci.com/Detail.aspx?Id=04ff38d3-49bc-4eac-82b3-aa9081b35004
------解决方案--------------------
英文: http://www.webservicex.net/globalweather.asmx
调用: GetWeather...
------解决方案--------------------
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx
------解决方案--------------------
直接去抓吗~
中央气象台
ASP.NET 2.0 抓取天气~非常简单~2008年01月04日 星期五 下午 09:57//Webclient:
private void GetWeather1()
{
url = "http://weather.news.qq.com/inc/dc296.htm";
WebClient wc = new WebClient();
byte[] pageData = wc.DownloadData(url);
string resultStr = Encoding.Default.GetString(pageData);//GB2312
response.write(resultStr);
}
//httpWebrequest:
private void GetWeather2()
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://weather.news.qq.com/inc/dc296.htm");
request.Method = "Get";
request.ContentType = "application/x-www-form-urlencoded";
WebResponse response = request.GetResponse();
Stream s = response.GetResponseStream();
StreamReader sr = new StreamReader(s,System.Text.Encoding.GetEncoding("GB2312"));
string html = sr.ReadToEnd();
s.Close();
sr.Close();
Response.Write(html.Replace("/images/","http://weather.news.qq.com/images/"));
}
http://hi.baidu.com/mazda6/blog/item/0543d8f90a9c475d242df263.html
------解决方案--------------------