1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Sub Command1_Click()
Dim URL As String
Dim Flags As Long
Dim TargetFrame As String
Dim PostData() As Byte
Dim Headers As String
URL = "http://YourServer" ' A URL that will accept a POST
Flags = 0
TargetFrame = ""
PostData = "Information sent to host"
' VB creates a Unicode string by default so we need to
' convert it back to Single byte character set.
PostData = StrConv(PostData, vbFromUnicode)
Headers = "Content-Type: application/x-www-form-urlencoded" & _
vbCrlf
WebBrowser1.Navigate URL, Flags, TargetFrame, PostData, Headers
End Sub |
Partager