HOW TO SEND FREE SMS FROM ASP.NET
First create account in way2sms or Site2SMS or 160by2 these are providers
parameters: uid (userid for way2sms account)
pwd(password for way2sms account)
msg(message)
phone(phone number for you want to send)
provider(you have account in way2sms then provider is way2sms or you have account in 160by2 then provider 160by2 or you have account in Site2SMS then Site2SMS)
Write code in send button click event:
string senderusername = userid from way2sms;
string senderpassword = Pwd from way2sms;
string no = "919640233523";
StreamReader objReader;
HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + senderusername + "&pwd=" + senderpassword + "&msg=" + "This is test sms from asp.net website" + "&phone=" + no + "&provider=way2sms");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
parameters: uid (userid for way2sms account)
pwd(password for way2sms account)
msg(message)
phone(phone number for you want to send)
provider(you have account in way2sms then provider is way2sms or you have account in 160by2 then provider 160by2 or you have account in Site2SMS then Site2SMS)
Write code in send button click event:
string senderusername = userid from way2sms;
string senderpassword = Pwd from way2sms;
string no = "919640233523";
StreamReader objReader;
HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + senderusername + "&pwd=" + senderpassword + "&msg=" + "This is test sms from asp.net website" + "&phone=" + no + "&provider=way2sms");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
if(responseString==1){
ScriptManager.RegisterStartupScript(this,
this.GetType(), "alertmessage", "javascript:alert('message sent successfully')", true);
}
else{
ScriptManager.RegisterStartupScript(this,
this.GetType(), "alertmessage", "javascript:alert('message sending fail')", true);
}
respStreamReader.Close();
myResp.Close();
respStreamReader.Close();
myResp.Close();
Nice Article..Very Helpful for all
ReplyDeletenow http://ubaid.tk/sms/sms.aspx? its not woking? how can i get new url
ReplyDeletehi did u get another url please help its urgent..
Deletei am able to send sms please help..
ReplyDelete