Sample Code Send SMS with HTTP API in VB.Net
I will walk you through a quick and interesting way to send SMS using a simple VB.Net Code. I wanted to make it as easy as possible for you, so I have created the web version in order to demonstrate the instructions that I will explain in this article. So, just follow these easy steps as I walk you through the whole process and in no time, sending SMS will be a best VB.Net Code.

How to Send SMS using HTTP API in VB.Net Code?
Imports System.Net
Imports System.Web
Public Class Simple_Code
Private Sub SendMessaageButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendMessaageButton.Click
Dim RequestWeb As HttpWebRequest
Dim ResponseWeb As HttpWebResponse = Nothing
Try
Dim User As String = “UR_USER”
Dim Key As String = “UR_KEY”
Dim Mobile As String = “9974984500”
Dim Message As String = HttpUtility.UrlEncode(“Test Message”)
‘
Dim Host As String = “http://temp.91bulksms.com/submitsms.jsp?user=” & user & “&key=” & Key & “&mobile=” & Mobile & “&message=” & Message & “&senderid=SENDER&accusage=1”
‘
RequestWeb = DirectCast(WebRequest.Create(Host), HttpWebRequest)
ResponseWeb = DirectCast(RequestWeb.GetResponse(), HttpWebResponse)
Dim Reader As IO.StreamReader = New IO.StreamReader(ResponseWeb.GetResponseStream)
MsgBox(“Resonce: ” + Reader.ReadToEnd().Trim())
ResponseWeb.Close()
Catch ex As Exception
MsgBox(“Error: ” + ex.Message)
Finally
RequestWeb = Nothing
ResponseWeb = Nothing
End Try
End Sub
End Class