Sample SMS Scripts

When developers search for an SMS Gateway, one of the reasons they turn to us is our wide selection of APIs. Fast, simple, reliable and built in such a way that they integrate with any system or application, all our APIs allow developers to create applications offering businesses online international SMS services, all supported by our reliable bulk SMS Gateway.


To learn more about our API, visit http://www.smskit.net/SMSC/API/index.php



Example of C# code script to send SMS via our gateway
using System.Net;
using System.IO;
WebClient client = new WebClient ();
// Add a user agent header in case the requested URI contains a query.
client.Headers.Add ("user-agent", "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.2; .NET CLR
1.0.3705;)");
client.QueryString.Add("username", "Your Username");
client.QueryString.Add("password", "Your Password");
client.QueryString.Add("action", "compose");
client.QueryString.Add("sender", "Your 11 character sender ID");
client.QueryString.Add("to", "Your Destination Number(s) in international format");
client.QueryString.Add("message", "Your URL Encoded message");
string baseurl ="http://www.smskit.net/SMSC/API";
Stream data = client.OpenRead(baseurl);
StreamReader reader = new StreamReader (data);
string s = reader.ReadToEnd ();
data.Close ();
reader.Close ();
return (s);
Example PHP script to send SMS via our gateway
$username = "Your Username";
$password = "Your Password";
$sender = "Your Sender ID";
$baseurl ="http://www.smskit.net/SMSC/API";
$message = urlencode("Your Message");
$to = "Your Reciepients";
// auth call
$url = "$baseurl/action=compose&username=$username&password=$password&sender=$sender
$to=$to&message=$message";
// do auth call
$response = file($url); //Check API section for details of posible response

Example VB.Net script to send SMS via our gateway
Imports System.Net
Imports System.IO
Dim client As WebClient = New WebClient
' Add a user agent header in case the requested URI contains a query.
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")
client.QueryString.Add("username", "Your Username")
client.QueryString.Add("password", "Your Password")
client.QueryString.Add("method", "compose")
client.QueryString.Add("to", "Your Reciepients")
client.QueryString.Add("sender", "Your Sender ID")
client.QueryString.Add("message", "Your Message")
Dim baseurl As String = "http://www.smskit.net/SMSC/API"
Dim data As Stream = client.OpenRead(baseurl)
Dim reader As StreamReader = New StreamReader(data)
Dim s As String = reader.ReadToEnd()
data.Close()
reader.Close()
Return