Saturday, July 27, 2013

Send SMS to mobile form C# Code

Send SMS to mobile form C# Code:-
---------------------------------
String uName = "uname";
String pwd = "password";
String strSender = "";
string PhNo = "";
string Msg = "Text Message 160 plain characters";
String strErrMsg = "";
string url = "http://www.unicel.in/SendSMS/sendmsg.php?uname=" + uName + "&pass=" + pwd + "&send=" + strSender + "&dest=91" + PhNo.ToString() + "&msg=" + Msg.ToString();
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
String ver = response.ProtocolVersion.ToString();
StreamReader reader = new StreamReader(response.GetResponseStream());
strErrMsg = reader.ReadLine();
reader.Close();
--------------------------------------------------------------------------------------------

No comments:

Post a Comment

Featured Post

Protect an API by using OAuth 2.0 with Azure Active Directory and API Management

Protect an API by using OAuth 2.0 with Azure Active Directory and API Management https://docs.microsoft.com/en-us/azure/api-management/api-...

Popular posts