Tuesday 28 May 2013

  SMS SENDING VIA WAY2SMS

 

The Below Code is also useful for sending sms via way2sms.... 

Try That and if any query than post, we can find also another solution.... 

1.two textbox and one button

.cs

-----

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;

public partial class sending_sms2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public void send(string uid, string password, string message, string no)
    {
  
 

        HttpWebRequest myReq =
       (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password +
       "&msg=" + message + "&phone=" + no + "&provider=way2sms");



        HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
        System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
        string responseString = respStreamReader.ReadToEnd();
        respStreamReader.Close();
        myResp.Close();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //for (int i = 0; i < 10; i++)
        //{
            send("YOURUSERNAME","PASSWORD",TextBox1.Text,TextBox2.Text);
        //}
        ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('sms sent successfully...');", true);

    }
}

19 comments:

  1. i tried your code but i am getting error as
    The remote server returned an error: (503) Server Unavailable.

    ReplyDelete
  2. if its not working at any time just create url like below and try that what you get...
    http://ubaid.tk/sms/sms.aspx?uid=youruidwaytosms&pwd=yourpwd&msg=hihello&phone=anysentnumber&provider=way2sms

    put this link on url box and watch what u get??

    ReplyDelete
  3. this url gives me an error like We needed a tune-up.

    ReplyDelete
  4. ok that means .....maintenance procedure is working at this site currently because of this you get that error. you are getting below message.

    "We're doing a bit of site maintenance that should only last a few hours.

    Go grab a new movie to watch, and we should be back by the time you are! "

    ReplyDelete
  5. Hello mitesh i have same problem like megha nair..."The remote server returned an error: (503) Server Unavailable".

    ReplyDelete
  6. this url gives me an error like "The remote server returned an error: (503) Server Unavailable".

    ReplyDelete
  7. I also have same message

    has anyone's problem got solved???

    ReplyDelete
  8. This code return error - The remote server returned an error: (503) Server Unavailable".

    ReplyDelete
  9. We can easily embed Sms code in our application /website and we can send mesaage to own end.for this execution we have to used sms API – that is provides by Sms provider like Way2sma.com,dbase.in etc.

    Note : -This is demo code – for send sms you need to purchase SMS-API. and than you have to use that API on this application.
    http://nirajtiwari.com/send-sms-asp-net-c-application-using-way2sms-api/

    ReplyDelete
  10. I too received the same message: 503

    ReplyDelete
  11. way2sms change their settings...they have implemented captcha method....from now onward its not possible to send sms using above code...

    ReplyDelete
  12. You can check out Bulksms.bz for cheapest & reliable bulk sms service

    ReplyDelete
  13. Thanks for the informative post it is very useful and helpful to me. Love to read more post from you.
    Bulk SMS Services in Indore

    ReplyDelete
  14. Are you a nut mr.Mitesh Vaishnav? What's about those two textboxes? who is sending? whom to send????

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. The way2sms is mostly used by everyone to send sms to each other. Sending sms using the code you have provided could a great idea to do this fast.

    SEO Company In Indore

    ReplyDelete