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 閱讀(156) 評論(0)  編輯  收藏

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


          網(wǎng)站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 清水县| 常德市| 新泰市| 马关县| 基隆市| 河北区| 弥渡县| 永泰县| 盐池县| 吕梁市| 谷城县| 电白县| 柞水县| 达拉特旗| 博野县| 常山县| 西充县| 保亭| 鄂尔多斯市| 远安县| 大足县| 许昌市| 衡南县| 老河口市| 元谋县| 新邵县| 安图县| 杭锦旗| 乌兰察布市| 阿城市| 陆良县| 安福县| 疏勒县| 麦盖提县| 青河县| 湛江市| 广西| 浠水县| 本溪| 太仆寺旗| 新野县|