sending SMS in asp.net via way2sms api

Posted by Unknown
sending SMS in asp.net via way2sms api

In this post am going to explain you about how send the SMS in asp.net with way2sms api

Here is the simple code snippet which will allows you to send the sms from your asp.net web site.

i have writen a method which will takes username , password ,message,Tonumber as as inputs and send the sms via way2sms.it will from the url and send the web request



 public void sendSMS(string username, string pwd, string message, string Tonumber)  
 {  
   HttpWebRequest Req = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + username+ "&pwd=" + pwd+ "&msg=" + message + "&phone=" + Tonumber+ "&provider=way2sms");  
   HttpWebResponse Resp = (HttpWebResponse)Req.GetResponse();  
   System.IO.StreamReader respStreamReader = new System.IO.StreamReader(Resp.GetResponseStream());  
   string responseString = respStreamReader.ReadToEnd();  
   respStreamReader.Close();  
   Resp.Close();  
 }  


Hope this will helps you
Labels: ,
  1. SMS is not sent...
    the response for http://ubaid.tk/sms/sms.aspx?uid is -11.. Message is nott sent

  2. this code is not working.there is no error but could not receive sms.

  3. Anonymous
    This comment has been removed by the author.
  4. Thanks for sharing!!
    Plz Have a look php sms

Post a Comment

 
test