way2sms using Java
UPDATED CODE
This tutorial shows that how you can use the http://www.indyarocks.com/ for sending message using your java application
Steps to Follow
You might also like:
10 Fastest Supercomputers In The World
SENDING SMS VIA WAY2SMS IN ASP.NET C#
UPDATED CODE
This tutorial shows that how you can use the http://www.indyarocks.com/ for sending message using your java application
Steps to Follow
- create a account on http://www.indyarocks.com/
- after getting indiarocks username and password use the code given below.
- modify the following details
- put your email id in Email string
- put your indiarocks username
- put your indiarocks password
- put number as the number on which you want to send sms
- put your messgae in messgae string , i limited the length to 110 char for stopping the misuse
- if you copy the code in your application's jsp page don't forget to import java.net.*,java.io.*,java.net.URLEncoder
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><%@page
language="java" import="java.net.*,java.io.*,java.net.URLEncoder;" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<html>
<head>
<title>index</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<%
/* This api is only for developemnt purpose.
info : make sure to use valid email otherwise it won't work,message char limit is 110
**/
String email="put your email id here";
String user=" your Indiarocks username";
String pass=" your Indiarocks password";
String number="some number on which you want to send msg";
String msg="your message to send" ;
String mURL="http://www.onl9class.com/smsapi/smsir.php?email="+email+"&user="+user+"&pass="+pass+"&number="+number+"&msg="+URLEncoder.encode(msg, "UTF-8");;
URL url = new URL(mURL);
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
for (String line; (line = reader.readLine()) != null;) {
out.println(line);
}
} finally {
if (reader != null) try { reader.close(); } catch (IOException ignore) {}
}
%>
</body>
</html>
You might also like:
10 Fastest Supercomputers In The World
SENDING SMS VIA WAY2SMS IN ASP.NET C#