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)  編輯  收藏

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


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 吴堡县| 三台县| 天津市| 邵阳市| 奉贤区| 福贡县| 万年县| 江油市| 九龙城区| 曲阳县| 平果县| 裕民县| 康平县| 宁国市| 丽江市| 紫金县| 蒲江县| 华阴市| 汶川县| 屯昌县| 青铜峡市| 尼玛县| 鞍山市| 西宁市| 府谷县| 驻马店市| 临夏县| 治县。| 托里县| 宁远县| 和田县| 东台市| 阳江市| 晋城| 婺源县| 兴宁市| 南开区| 鄂伦春自治旗| 东阳市| 宜阳县| 清丰县|