相关文章
推荐文章
热门文章
asp+ 如何跨站抓取 页面
|
* 豆腐制作 都是精品 http://www.asp888.net 豆腐技术站 如果您转贴 本文 请 保留版权信息 */ 豆腐在以前的文章中 讲过 如何用 PHp 和 Asp 跨站抓取别的站点的页面,今天我们来测试一下 asp+ 是怎么实现 跨站抓取 别的站点的页面 Code Listing <%@ Assembly Name="System.Net" %> <%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="VB" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) Dim HttpWResp as HTTPWebresponse Dim sr As StreamReader dim STRtemp as string text1.text = "" HttpWReq = WebRequestFactory.Create("http://www.asp888.net") HttpWReq.KeepAlive = false HttpWResp = HttpWReq.GetResponse() sr = new StreamReader(HttpWResp.GetResponseStream(), Encoding.ASCII) Try line=sr.ReadLine() do while line <> null line = sr.ReadLine() lineENC = server.HTMLencode(line) & vbcrlf & "<br>" text1.text = text1.text & lineENC loop Catch ex As Exception text1.text = "发生错误: " & ex.Message End Try End Sub 作者:豆腐() |
↑返回顶部
打印本页
关闭窗口↓
| 收藏本文到:天极网摘 新浪VIVI 和讯网摘 博彩中心 365Key网摘 poco网摘 狐摘 亿友响享Yeeyoo igooi-it网摘 5seek网摘 I2Key 我摘网摘 天下图摘 YouNote 百特门 |
