VB.NET

To send SMS using VB.NET, you must include the following classes in your project:

using System.Net;
using System.Web;
using System.Text;
using System.IO;

' Variable Declaration, (CAN BE CHANGED)
Dim username As String = "233xxxxxxxxx" ' Your username
Dim apikey As String = "xxxxxx" ' ApiKey
Dim senderid As String = "ASPSMS" ' Sender ID
Dim recipient As String = "233xxxxxx,233xxxxxx,233xxxxxx" ' MSIDSN (Number of the recipient in the International format)
Dim msg As String = "Message Test VB.NET" ' Message content
Dim authmode As String = "http" ' Mandatory (DO NOT CHANGE - Case Sensitive)

' RUN the Application (DO NOT CHANGE)
Dim request As WebRequest = WebRequest.Create("http://aspsmsapi.com/http/sendsms.aspx?")
request.Method = "POST"
Dim postData As String = "username=" + username & "&apikey=" + apikey & "&senderid=" + senderid & "&msg=" + msg & "&dest=" + recipient & "&authmode="+ authmode

Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
The new disc fly replica watches collection series ladies watch incorporates many replica watch modern and fashionable aesthetic elements in the classic design. Available in 39mm and 36mm sizes, the watch is fake replica watches available in a variety of materials with replica rolex a rich palette of colours.