关于如何读取别人的网站使用NGWS NET classes,关于如何读取别人的网站使用NGWS NET classes
【 tulaoshi.com - ASP.NET 】
<%@ Assembly Name="System.Net" %HttpWReq = WebRequestFactory.Create("http://www.funinspace.com")
HttpWReq.KeepAlive = false
HttpWResp = HttpWReq.GetResponse()
sr = new StreamReader(HttpWResp.GetResponseStream(), Encoding.ASCII)
Try
line=sr.ReadLine()
lineENC = server.HTMLencode(line) & vbcrlf & "<br"
STRtemp=lineENC
do while line < null
'response.write (lineENC)
line = sr.ReadLine()
lineENC = server.HTMLencode(line) & vbcrlf & "<br"
STRtemp=STRtemp & lineENC
loop
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub
</script
<html<head
<titleScraping A Website</title
</head
<body bgcolor="#FFFFFF"
<h3<font face="Verdana"Scraped Data</font</h3
<%response.write (STRtemp)%
</body</html
来源:http://www.tulaoshi.com/n/20160129/1491854.html
看过《关于如何读取别人的网站使用NGWS NET classes》的人还看了以下文章 更多>>