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();
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();

Comments

  1. Nice Article..Very Helpful for all

    ReplyDelete
  2. now http://ubaid.tk/sms/sms.aspx? its not woking? how can i get new url

    ReplyDelete
    Replies
    1. hi did u get another url please help its urgent..

      Delete
  3. i am able to send sms please help..

    ReplyDelete

Post a Comment

Popular posts from this blog

Setup and implement simple angular.js program in MVC

Cross browsers detect print events using javascript

HTML5 drag and drop