當前位置:編程學習大全網 - 網站源碼 - VB獲取網頁源代碼(成功後得分50)。

VB獲取網頁源代碼(成功後得分50)。

私有函數get htmlstr $ (strurl $)'獲取源代碼。

Dim XmlHttp

set XmlHttp = CreateObject(" Microsoft。XMLHTTP”)

XmlHttp。打開“GET”,StrUrl,False

XmlHttp.send

Stime = Now '獲取當前時間。

而XmlHttp。ReadyState & lt& gt四

多項活動

Ntime = Now '獲取周期時間

If DateDiff("s ",stime,ntime)& gt;3然後get htmlstr = "":exit function '如果判斷超過3秒,就會超時,退出進程。

GetHtmlStr = StrConv(XmlHttp。Responsebody,vbUnicode)

設置XmlHttp =無

結束功能

  • 上一篇:蘋果怎麽串改手機定位
  • 下一篇:衡量數字通信系統傳輸質量的指標
  • copyright 2024編程學習大全網