I want to create a win form using which I can send the SMS to desired mobile number. I have tried different ways to send, But not succeeded in one, here are my efforts, which didn't worked. (These are all random numbers for posing)
First Try:
using SmsClient;
SendSms oSendSMS = new SendSms();
MessageBox.Show(oSendSMS.send("1234567890", "1111", "Hello", "1234567890"));
Second Try:
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();
Third Try:
using SMSClassLibrary;
string status = "";
CookieContainer cookie = Login.Connect("1234567890", "1111", out status);
string[] siteParameters = Login.GetSiteParameters(cookie);
MessageBox.Show(SendSMS.Send_Processing("1234567890", "jkdfhjnhsd", cookie, siteParameters));
Can any one please help in succeeding these efforts?
You cannot directly send an SMS over the internet, you need to use a provider with interconnects to the mobile networks and use what ever API they provide you with. Your second example looks like something along those lines.
Their are loads of providers, just search for bulk SMS or SMS API.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.