SMS API for Php

Send SMS through website Via API with just a simple integration..


JAVA Script through SMS messaging is one of the services we offer. Here we'll show you how to use our SMS gateway in JAVA Script. Take the SMS JAVA Script code below to send SMS via Developers' Central. Simply register for an account, and you will automatically receive 10 FREE SMS credits to try our service.

Code to send SMS in JAVAScript

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://sms.xpressdndsms.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);
}
}

bulk-sms-campaigning
Instant Delivery
Create your users as groups with group name and recipient name and send message using groups, Here you can manage groups, edit group, change group, Also simply upload csv file and import users into groups, user friendly and easy options.
test-message-icon
Your Own Sender ID
Sender ID is 6 digit Name or Number, You can promote your brand using name or any number. You can send SMS using Your company name or Number, Once we receive your Sender ID request with in minutes we will activate your sender ID.
lead-sms-icon
Delivery Reports
After Completion of your SMS Campaign, We have detailed reports for you, Search Date or Month wise you will get reports, Download detailed reports for further verification. All SMS reports are 100% genuine and fast download.
bestprice
Secure API
xpresdndsms.com offer Guarantees Easy to use SMS Secure APIs. lowest price for the bestest services we provide. High services = low price is a key-feature of Xpressdndsms.com. Find a low price & we will match it.

10,000 to 50,000 SMS

0.15
  • 1 year Validity
  • Enable DND Numbers
  • 18% GST

50,001 to 1,00,000 SMS

0.12
  • 1 year Validity
  • Enable DND Numbers
  • 18% GST

1,00,001 to 5,00,000 SMS

0.10
  • 1 year Validity
  • Enable DND Numbers
  • 18% GST

5,00,001 And 10,00,000

0.09
  • 1 year Validity
  • Enable Live DND Numbers
  • 18% GST

10,00,001 And Above SMS

0.08
  • 1 year Validity
  • Enable Live DND Numbers
  • 18% GST

Xpress Digital Media Solution is the best to buy SMS