Question

I am building a desktop app in Visual C# 2.0 that can send sms through way2sms.com. anyone of you ve tried such thing...? please help.

Was it helpful?

Solution

This link has a solution

http://www.aswinanand.com/2008/07/send-free-sms-web-service/

We can pass parameters to the URL provided with the help of a Web Request class. I did it with following lines

HttpWebRequest request = (HttpWebRequest) WebRequest.Create("_http://www.aswinanand.com/sendsms.php?uid=" + this.txtUserID.Text + "&pwd=" + this.txtPassword.Text + "&phone=" + this.txtToMobileNo.Text + "&msg=" + this.txtMessage.Text);

StreamReader reader = new StreamReader(request.GetResponse().GetResponseStream(), Encoding.UTF8);
return reader.ReadToEnd();

There is another tool implemented in java available at http://way2sms.codeplex.com/, which i am implementing in C# now.

OTHER TIPS

Never used way2sms. I used clickatell. It works great even on webservers.

http://www.clickatell.com/developers/api_comobject.php

here is a good article on sending sms in c# using way2sms

http://codeglobe.in/api/way2sms/17-way2sms-api.html

i hav developed an api of way2sms and other providers which can be directly used by everyone.. check it out at http://ubaid.tk/sms/

you can use the web page created by me, or u can use the api structure.. for example, your application can directly fwd the request to

http://ubaid.tk/sms/sms.aspx?uid=99999xxxxx&pwd=12345&msg=your sms text which u want 2 send&phone=9996669990&provider=way2sms

where uid is the way2sms userid, pwd is the way2sms password, msg is ur message which needs to be sent, and phone is the phone number wher u want to send the sms.. the differen providers are way2sms, fullonsms, smsinside and tezsms..

works 100%, all the time.. :)

cheers..

For that you need to input the API for SMS and integrate in your asp.net application.

Download SOurceCode HEre

http://alfasms.alfredfrancis.in/?uname=YOUR_USERNAME&pass=YOUR_PASSWORD&to=YOUR_RECEPTIANT&mess=YOUR_MESSAGE&gateway=YOUR_GATEWAY

>> Where YOUR_USERNAME your way2sms/160by2/fullonsms/sms440/site2sms USERNAME(ie mobile number)
>>Where YOUR_PASSWORD your way2sms/160by2/fullonsms/sms440/site2sms PASSWORD.
>> Where YOUR_RECEPTIANT is to which number you want to send SMS.
>> Where YOUR_MESSAGE is the message you want to send.
>> Where YOUR_GATEWAY is way2sms/160by2/fullonsms/sms440/site2sms.

string connectionString = "<a href="http://alfasms.alfredfrancis.in/?uname=YOUR_USERNAME&pass=YOUR_PASSWORD&to=YOUR_RECEPTIANT&mess=YOUR_MESSAGE&gateway=YOUR_GATEWAY">http://alfasms.alfredfrancis.in/?uname=YOUR_USERNAME&pass=YOUR_PASSWORD&to=YOUR_RECEPTIANT&mess=YOUR_MESSAGE&gateway=YOUR_GATEWAY</a>";

try
 {

System.IO.Stream SourceStream = null;

System.Net.HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(connectionString);

myRequest.Credentials = CredentialCache.DefaultCredentials;

HttpWebResponse webResponse = (HttpWebResponse)myRequest.GetResponse();

SourceStream = webResponse.GetResponseStream();

StreamReader reader = new StreamReader(webResponse.GetResponseStream());

string str = reader.ReadLine();

}

catch (Exception ex)
 {

}

Please visit

http://mohanramphp.kodingen.com/blog/2011/01/13/send-free-sms-%E2%80%93-web-service/

At present aswinanand codes for sending sms is inactive.

Usage of sending sms is given in blog.

Short Example Usage:

http://mohanramphp.elementfx.com/sms/index.php?uid=9933445566&pwd=password&phone=9812345678;9933445566&msg=This is sample message

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top