抓取遠程網頁

引用com Microsoft XML, V2.6 public string GetRemoteHtmlCode(string Url) { string s = ""; MSXML2.XMLHTTP _xmlhttp = new MSXML2.XMLHTTPClass(); _xmlhttp.open("GET", Url, false, null, null); _xmlhttp.send(""); if (_xmlhttp.readyState == 4) { s = System.Text.Encoding.Default.GetString((byte[])_xmlhttp.responseBody); } return s; }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章