VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



MsXml http web request / submit work in msxml v2.0 and v3.0 and return the html of the page .

by Oren wisman (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 14th June 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

MsXml http web request / submit work in msxml v2.0 and v3.0 and return the html of the page .

API Declarations


' add to project references the componect
' Micro$oft xml version 2.0
' Or Micro$oft xml v3.0
' And and two command button

Rate MsXml http web request / submit work in msxml v2.0 and v3.0 and return the html of the page .




Dim XXmlhttp3 As New XMLHTTP30
Dim hhtml As String


Private Sub Command1_Click()
   XXmlhttp3.open "get", "http://edition.cnn.com/"
   XXmlhttp3.send
   wait (5)  ' Call to Function as wait for and of load the page or timeout 
   hhtml = XXmlhttp3.responseText
   MsgBox XXmlhttp3.responseText
   
End Sub

Private Sub Command2_Click()
Dim Xmlhttp2 As New XMLHTTP
Dim html As String

   Xmlhttp2.open "post", "http://edition.cnn.com/"
   Xmlhttp2.send
   html = Xmlhttp2.responseText
   MsgBox Xmlhttp2.responseText
End Sub


Public Function wait(timeout As Byte)
Dim lopx As Integer
On Error Resume Next
   Do While XXmlhttp3.statusText <> "OK"
        DoEvents
        Sleep (10)
        
        If (lopx \ 100) > timeout Then
            Exit Do
        Else
            lopx = lopx + 1
            Debug.Print lopx
        End If
   Loop
    
End Function


Download this snippet    Add to My Saved Code

MsXml http web request / submit work in msxml v2.0 and v3.0 and return the html of the page . Comments

No comments have been posted about MsXml http web request / submit work in msxml v2.0 and v3.0 and return the html of the page .. Why not be the first to post a comment about MsXml http web request / submit work in msxml v2.0 and v3.0 and return the html of the page ..

Post your comment

Subject:
Message:
0/1000 characters