-
VB - Get HTML Source
I saw a post where someone was looking for a way to grab the HTML source from a website, but I can't find that post to reply, so here's my snippet...(you need a from with an INET control on it)
Code:
Private Function GetHTML(url$) As String
Dim response$
Dim vData As Variant
Inet1.Cancel
response = Inet1.OpenURL(url)
If response <> "" Then
Do
vData = Inet1.GetChunk(1024, icString)
DoEvents
If Len(vData) Then
response = response & vData
End If
Loop While Len(vData)
End If
GetHTML = response
End Function
-
Might I suggest you change the subject line to be a little more descriptive of the snippet.... say, "How to Download Web Page Source"