VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code retrieves the entire HTML source from a WEB page using an inet control. This code works,

by Yansb (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 10th September 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code retrieves the entire HTML source from a WEB page using an inet control. This code works, differently from many others similar codes

API Declarations


'
' Place in a form an inet control and enjoy this code
' sample: text_returned = getHTML("http://www.yansb.com")
'

Rate This code retrieves the entire HTML source from a WEB page using an inet control. This code works,



Dim response$
Dim vData As Variant

  Inet1.Cancel
  'Label1.Caption = 0
  response = Inet1.OpenURL(url)
  If response <> "" Then
    Do
      vData = Inet1.GetChunk(1024, icString)
      DoEvents
      If Len(vData) Then
        response = response & vData
        'Label1.Caption = CStr(Len(response))
      End If
    Loop While Len(vData)
  End If
  'Label1.Caption = CStr(Len(response))
  GetHTML = response
End Function

Download this snippet    Add to My Saved Code

This code retrieves the entire HTML source from a WEB page using an inet control. This code works, Comments

No comments have been posted about This code retrieves the entire HTML source from a WEB page using an inet control. This code works, . Why not be the first to post a comment about This code retrieves the entire HTML source from a WEB page using an inet control. This code works, .

Post your comment

Subject:
Message:
0/1000 characters