Copy codeThe Code is As follows: Dim postData As String
Dim byteArray As Byte ()
Dim objWebRequest As HttpWebRequest
Dim newStream As Stream
PostData = "cell = Information provided by the SMS supplier 1 & enterpriseId = Information provided by the SMS supplier 2 & mobile = mobile Phone Number 1, mobile phone number 2 & message = Send data test... "
ObjWebRequest = WebRequest. Create ("http://xxx.yyy.com.cn/SmsSend.jsp ")
ObjWebRequest. Method = "POST"
ObjWebRequest. ContentType = "application/x-www-form-urlencoded"
ByteArray = System. Text. Encoding. UTF8.GetBytes (postData)
ObjWebRequest. ContentLength = byteArray. Length
NewStream = objWebRequest. GetRequestStream ()
NewStream. Write (byteArray, 0, byteArray. Length)
NewStream. Close ()
'Return data
Dim response As HttpWebResponse
Dim sr As StreamReader
Dim textResponse As String
Response = objWebRequest. GetResponse ()
Sr = New StreamReader (response. GetResponseStream (), System. Text. Encoding. Default)
TextResponse = sr. ReadToEnd ()