Public Function HTTPPost(ByVal myURL As String, ByVal myPost As String)

Dim temp As String
temp = “”
Try

Dim myURI As New Uri(myURL)
Dim request As Net.WebRequest = Net.WebRequest.Create(myURI)
Dim encoding As New System.Text.ASCIIEncoding()
Dim myByte As Byte() = encoding.GetBytes(myPost)
request.Method = “POST”
‘ Set the content type of the data being posted.
request.ContentType = “application/x-www-form-urlencoded”
‘ Set the content length of the string being posted.
request.ContentLength = myByte.Length
Dim newStream As IO.Stream = request.GetRequestStream()
newStream.Write(myByte, 0, myByte.Length)
newStream.Close()
Dim response As Net.HttpWebResponse = CType(request.GetResponse(), Net.HttpWebResponse)
Dim datastream As IO.Stream = response.GetResponseStream
Dim reader As New IO.StreamReader(datastream)
Dim responseFromServer As String = reader.ReadToEnd()
temp = responseFromServer
reader.Close()
datastream.Close()
response.Close()

Catch

MsgBox(Err.Description)

End Try
Return temp

End Function