Search This Blog

Friday, July 8, 2011

Unofficial Way2Sms API Using JAVA To Send Free SMS

This is a way to send free sms from our computer through Way2sms, which allows to send free sms.
Using this code one can send sms to multiple phone numbers like shown in the screen shot

For that you need to have the following


1) You have to register at Way2SMS and Obtain a User Name and Password.

2)You have to find the ACTION value.

*In-order to  find the action value first install 'fire bug' to your Firefox.
*Then login to your way2sms account.
*Open Firebug from tools->Firebug->open firebug.
*In the search field of firebug type 'action' and click next until you find something like
<input id="Action" type="hidden" value="sa65sdf656fdfd" name="Action">

*Now the value 'sa65sdf656fdfd' is your ACTION value.


Now everything set up. Download the source


JAVA PROGRAM FOR SENDING SMS THROUGH WAY2SMS

Now open the source and edit the following fields in main()
* USERNAME : Your way2sms username
*PASSWORD : Your way2sms password
*ACTION : The ACTION value we found out
*Also uncomment the proxy support if needed.

Now compile the code

          javac Way2SMS.java

Run the code

java Way2SMS phone no1 no2 ....  message your message here!



Example :
java Way2SMS phone 1234567890 0987654321 message Where where you yesterady?





Note: Few weeks ago one of my friend Srijidh asked about sending sms from our desktop. But at that time we were having university exams. Today I remembered his query and decided to code. I wrote this code after referring several python codes from github and that found on google search.

Note2: The ACTION value is so important that if you have omitted the program will not  give the desired result. In future I will add feature to automatically fetch that ACTION field for you.












Sunday, June 12, 2011

Simple Command Line Cricket Score Viewer.

This is a command line program for displaying cricket scores.


This https://github.com/semk/cricinfo python library  found in the blog http://foobarnbaz.com/lab/ made me think about creating a similar one in Java. I created a simple library class and its implementation for this purpose. Let me show you some screen shots
It can show all the scheduled matches for that day,


  Or it can list already started matches,

 Or it can show match of your favorite team,




This program works based on the http://www.espncricinfo.com/ site's rss feed.


Usage
--------- 
SOURCE:COMMAND LINE CRICKET SCORE VIEWER


Download the two java sources files to a directory, FOLDER


now goto terminal type,


cd FOLDER

javac *.java

java CricDisplay

note: edit CricDisplay.java file and uncomment the proxy support if needed

I am looking forward to add more features like displaying match schedules, match status etc...