Avis Junior Poster

Joined: 07 Oct 2003 Posts: 510 Location: India
|
Posted: Oct 8th, 2003 04:14 AM Post subject: How to Download Webpage Source |
|
|
By following code you can get the source code of a html page or read text file from a website etc. This is actually acomplished by using Microsoft Inet Control.
| 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 |
|
|