Saturday 17 November 2012

Send SMS using Asp.net

Send SMS  from your site using way2sms


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

uid : your userid for the required sms provider
pwd : your password for the required sms provider
provider : way2sms(default), fullonsms, smsindia, whozzat, smsinside, site2sms. if you do not specify any provider, way2sms will be used by default.
phone : phone number whom you want to send sms.


Currently, the following service providers are supported for SMS sending.
  1. Way2sms : 140 Chars
  2. Full On SMS : 140 Chars
  3. 160 by 2 : 140 Chars
  4. Site 2 SMS : 260 Chars.
  5. SMSFI.com : 138 Chars.
  6. Freesms8 : 160 Chars.
  7. Sms440 : 440 Chars 8.BhokaliSms : 440 Chars