public string GetHttpData(string sUrl)
                  {
                      string sRslt = null;
                      WebResponse oWebRps = null;
                      WebRequest oWebRqst = WebRequest.Create(sUrl);
                      oWebRqst.Timeout = 50000;
                      try
                      {
                          oWebRps = oWebRqst.GetResponse();
                      }          
                  
                      finally
                      {
                          if (oWebRps != null)
                          {
                              StreamReader oStreamRd = new StreamReader(oWebRps.GetResponseStream(), System.Text.Encoding.GetEncoding("utf-8"));
                              sRslt = oStreamRd.ReadToEnd();
                              oStreamRd.Close();
                              oWebRps.Close();
                          }
                      }
                      return sRslt;
                  }
          posted on 2009-01-12 10:07 sanmao 閱讀(158) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 甘谷县| 托克托县| 三门峡市| 荥阳市| 南城县| 乌什县| 辉县市| 酒泉市| 溧水县| 荔波县| 榕江县| 永和县| 太谷县| 东港市| 遂溪县| 当阳市| 谷城县| 巩义市| 建平县| 湘西| 班戈县| 璧山县| 大姚县| 蒙阴县| 鄂尔多斯市| 浮梁县| 正镶白旗| 三原县| 铁岭县| 汉寿县| 南皮县| 安化县| 阜康市| 临泉县| 万宁市| 青川县| 尉犁县| 柯坪县| 军事| 宁夏| 广州市|