<form id="hz9zz"></form>
  • <form id="hz9zz"></form>

      <nobr id="hz9zz"></nobr>

      <form id="hz9zz"></form>

    1. 明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

      asp+ 怎么跨站抓取 頁面

      [摘要]*豆腐制作 都是精品http://www.asp888.net 豆腐技術站如果您轉貼 本文 請 保留版權信息*/豆腐在以前的文章中 講過 如何用 PHp 和 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
      </script>
      <html><head>
      <title>跨站</title>
      </head>
      <body bgcolor="#FFFFFF">
      <h3><font face="Verdana">抓來得數據</font></h3>
      <asp:TextBox id="text1" Width="600px" Textmode="multiline" rows="40"
      runat="server"/>
      </body></html>

      作者:豆腐()





      日韩精品一区二区三区高清