Foxtable(狐表)用户栏目专家坐堂 → 请教如何获取网页源码?


  共有2567人关注过本帖平板打印复制链接

主题:请教如何获取网页源码?

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/8/20 14:25:00 [只看该作者]

Dim url As String = "http://www.foxtable.com"

Dim rqst As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)

Dim rsps As System.Net.HttpWebResponse = rqst.GetResponse

Dim stm As System.IO.Stream = rsps.GetResponseStream()

Dim reader As New System.IO.StreamReader(stm)

Dim str As String = reader.ReadToEnd

rsps.Close
stm.Close
reader.close

msgbox(str)


 回到顶部