Port of app:
IP address of your phone currently connected to a network.
<pre class=”code”>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
public class SendSMS {
public static void send(String mobileNumber, String textMessage, String ipAddress,
int portNumber) {
try {
String urlString = “http://” + ipAddress + “:” + portNumber
+ “/sendsms?phone=” + mobileNumber + “&text=” +URLEncoder.encode(textMessage,”ISO-8859-1″);
URL url = new URL(urlString);
URLConnection urlConnection = url.openConnection();
HttpURLConnection connection = null;
if (urlConnection instanceof HttpURLConnection) {
connection = (HttpURLConnection) urlConnection;
} else {
System.out.println(“INVALID SMS HTTP URL.”);
return;
}
BufferedReader in = new BufferedReader(new InputStreamReader(
connection.getInputStream()));
String urlString2 = “”;
String current;
while ((current = in.readLine()) != null) {
urlString += current;
}
System.out.println(urlString2);
}catch(MalformedURLException e){
System.out.println(“Please provide valid IP and PORT :”+e.getMessage());
}
catch (IOException e) {
System.out.println(“Invalid phone number!!”);
}
}
}
Binary Cipher


To use our services all you need to do is to integrate our SMS gateway API into
your applications, websites, software and customized applications. This blog is so informative for providing a valuable information about sending bulk sms api java.