< % Set the values same as you use in your saakshisoftware.com account
username = "user"
pwd ="password"
'Set the mobile number on which you want to send SMS
mobileno = "919509247017"
'Your Message
smsg = "Test SMS from saakshi software"
' You approved sender id
senderid = "WebSMS"
channel="promo"
msg="testmsg"
routeId="15"
Dim objXmlHttpMain , sURL
sURL="http://dnd.saakshisoftware.com/api/mt/SendSMS?user="&username&"&password="&&"&senderid="&senderid&"&channel="&channel&"&DCS=0&flashsms=0&number="&mobileno&"&text="&msg&"&route="&routeId&"
Set objXmlHttpMain = Server.CreateObject("Msxml2.ServerXMLHTTP")
on error resume next
objXmlHttpMain.open "GET",sURL, False
objXmlHttpMain.setRequestHeader "Content-Type", "text/urlencoded"
objXmlHttpMain.send
'Store response
response.Write (objXmlHttpMain.responseText)
% >
using System
using System.IO
using System.Net
using System.Text
using System.Web
string sAPIKey= "APIKEY";
string sNumber = Session["Mobile"].ToString();
string sMessage = "Test SMS From Our Company";
string sSenderID = "WEBSMS";
string sChannel="promo";
string sRoute="15";
string sURL = "http://dnd.saakshisoftware.com/mt/SendSMS?APIKEY="+sAPIKey+"&senderid="+sSenderID+"&channel="+sChannel+"&DCS=0&flashsms=0&number="+sNumber+"&text="+sMessage+"&route="+sRoute+";"
string sResponse = GetResponse(sURL);
Response.Write(sResponse);
public static string GetResponse(string sURL)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sURL);
request.MaximumAutomaticRedirections = 4;
request.Credentials = CredentialCache.DefaultCredentials;
try
{
HttpWebResponse response = (HttpWebResponse)request .GetResponse();
Stream receiveStream = response.GetResponseStream(
);
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
string sResponse = readStream.ReadToEnd();
response.Close();
readStream.Close();
return sResponse;
}
catch(Exception ex)
{
return ex.tostring();
}
}
Massa sem nunc imperdiet ipsum imperdiet, duis semper justo vel, erat vel tincidunt molestie hac ut consequat. Quis tellus amet et dolor, et tristique vel felis, laoreet vel, et eleifend sollicitudin consectetuer sagittis. Mauris condimentum inceptos eu nulla ut neque, tempus nibh tincidunt cras molestie
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.*;
public class sendsmsApi
{
public static String retval = "";
public static String SMSSender(String APIKey, String number, String text, String senderid,String channel ,String flashsms,String route)
{
String rsp = "";
try {
// Construct The Post Data
String data = URLEncoder.encode("APIKey", "UTF-8") + "=" + URLEncoder.encode(APIKey, "UTF-8");
data += "&" + URLEncoder.encode("senderid", "UTF-8") + "=" + URLEncoder.encode(senderid, "UTF-8");
data += "&" + URLEncoder.encode("channel", "UTF-8") + "=" + URLEncoder.encode(channel, "UTF-8");
data += "&" + URLEncoder.encode("DCS", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8");
data += "&" + URLEncoder.encode("flashsms", "UTF-8") + "=" + URLEncoder.encode(flashsms, "UTF-8");
data += "&" + URLEncoder.encode("number", "UTF-8") + "=" + URLEncoder.encode(number, "UTF-8");
data += "&" + URLEncoder.encode("text", "UTF-8") + "=" + URLEncoder.encode(text, "UTF-8");
data += "&" + URLEncoder.encode("route", "UTF-8") + "=" + URLEncoder.encode(route, "UTF-8");
String url1="http://dnd.saakshisoftware.com/api/mt/SendSMS";
url1+="?"+data;
URL url=new URL(url1);
URLConnection connection = url.openConnection();
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
StringBuilder sb = new StringBuilder();
String line;
while ((line = reader.readLine()) != null)
{
sb = sb.append(line);
}
rsp = sb.toString();
}
catch (Exception e)
{
e.printStackTrace();
}
return rsp;
}
public static void main(String[] args) {
String response = SMSSender("Enter your API key", "Enter your number", "Enter test message", "Enter SenderID"," Enter Channel" ,"Flash", "Route");
System.out.println("Response"+response);
}
}