devxlogo

GetHtmlPageSource – Get the HTML of a page using MSXML library

GetHtmlPageSource – Get the HTML of a page using MSXML library

' Getting the HTML code of any page on the web' NOTE: requires the Microsoft XML library' Example:'    Text1.Text = GetHtmlPageSource("http://www.vb2themax.com/Default.asp")Function GetHtmlPageSource(ByVal URL As String)    Dim objHTTP  As New XMLHTTP    ' add the http:// in case it isn't already present in the specified URL    If Left$(URL, 7)  "http://" Then URL = "http://" & URL        ' open the page in sync mode    objHTTP.open "GET", URL, False    objHTTP.send    ' check the result of the operation    If objHTTP.Status = "200" Then        GetHtmlPageSource = objHTTP.responseText    End IfEnd Function

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist