文件名称:ASP.NET使用HttpWebRequest读取远程网页源代码
文件大小:30KB
文件格式:PDF
更新时间:2024-02-11 13:14:40
.NET AS asp
读取远程网页能做什么就不用多说了吧,做小偷程序或是采集,也就诸如此类了吧。 public string GetPage(string url) { HttpWebRequest request = null; HttpWebResponse response = null; StreamReader reader = null; try { request = (HttpWebRequest)WebRequest.Create(url); request.Timeout = 20000; request.AllowAutoRedirect = fa