1

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?

4

2 回答 2

0

请参阅API 的站点,该站点声称“Way2SMS”提供程序(根据您以 结尾的 URL,您似乎在使用&provider=way2sms)不再适用于非专用用户。

于 2013-07-05T11:34:46.390 回答
-1

您不能直接通过 Internet 发送 SMS,您需要使用与移动网络互连的提供商,并使用他们为您提供的任何 API。你的第二个例子看起来像这样。

他们有很多供应商,只需搜索批量 SMS 或 SMS API。

于 2013-07-05T11:17:58.197 回答