Friday, December 9, 2011

comment_icon 175 Sending sms via way2sms using Java


i have a paid API
If you are willing to pay small amount such as 50-100RS for 100-300sms
contact me at

The sole purpose of the Api is to be used in development by i am not releasing the actual sour

This Tutorial showz that how you can use the for sending message using your java application
Steps to Follow

  1. create a account on 
  2. after getting indiarocks username and password use the code given below.
  3. modify the following details
    1. put your email id in Email string
    2. put your indiarocks username
    3. put your indiarocks password
    4. put number as the number on which you want to send sms
    5. put your messgae in messgae string , i limited the length to 110 char for stopping the misuse
  4. if you copy the code in your application's jsp page don't forget to import*,*,
Example JSP code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><%@page
 language="java" import="*,*,;"
contentType="text/html; charset=ISO-8859-1"

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
/* This api is only for developemnt purpose, if you missuse the api i will
 remove it so make sure you wont misuse it
author : Abhimanyu singh rathore
email :

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="" +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>