by Ryan Emerle (1 Submission)
Category: Internet/HTML
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 16th December 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Uses Microsoft's Inet Control to pull HTML source from a desired URL and parses it. There are other snipets on here, but they dont seem to
API Declarations
Public b1found
Public b2found
'change it to delimit it by any characters or none at all. Of course, that
'requires you to know how to code, and i assume you do. Its just a matter of
'modifing the logic a bit. I would submit another version that doesnt parse the
'data, but that would be redundant.
'
'Just a note: you will need to add a listbox for this. It just throws the data
'in there. Or you could, quite simply, modify the code and put the data
'wherever you like :) Oh, and you will also need the inet control, of course.
Function GetSource(ByVal URL As String)
Dim Data() As Byte
Dim Text As String
Dim i as Integer
Init
Data = Inet1.OpenUrl(URL)
For i = 1 To UBound(Data)
If Chr(Data(i)) = "<" Then b1found = 1
If Data(i) > 0 And b1found = 1 Then
Text = Text + Chr(Data(i))
If Chr(Data(i)) = ">" Then
b2found = 1
List1.AddItem Text
Text = ""
Init
End If
End If
Next i
End Function
Public Function Init()
b1found = 0
b2found = 0
End Function
No comments have been posted about Uses Microsoft's Inet Control to pull HTML source from a desired URL and parses it. There are other. Why not be the first to post a comment about Uses Microsoft's Inet Control to pull HTML source from a desired URL and parses it. There are other.