使用way2sms网关从我的网站向任何手机号码发送短信 [英] sending sms to any mobile number from my website using way2sms gateway
本文介绍了使用way2sms网关从我的网站向任何手机号码发送短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下代码,但没有显示错误,但短信没有提到电话号码,有什么问题?
代码:
protected void Button1_Click(object sender,EventArgs e)
{
sendSMS(9331619281,8845,checking,9331619281);
}
public void sendSMS(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();
}
解决方案
尝试使用Hike,他们提出了类似的策略
< blockquote>你可以使用n个短信网关 [ ^ ]这样做。
这里给出了类似的答案:
使用Asp.net发送短信 [ ^ ]
以下相关文章:
使用.NET发送短信 [ ^ ]
使用.NET通过Web服务发送SMS [ ^ ]
--Amit
I am using the following code but there is no error shown but sms not goes to mentioned phone number, what is the problem?
code:
protected void Button1_Click(object sender, EventArgs e) { sendSMS("9331619281", "8845", "checking", "9331619281"); } public void sendSMS(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(); }
解决方案
Try using Hike, they have come up with some similar strategy
You can use n numbers of SMS gateway[^] to do this.
A similar answer has given here:
Sending Sms Using Asp.net[^]
A related Article you can find below:
Sending SMS using .NET[^]
Sending SMS using .NET through a Web service[^]
--Amit
这篇关于使用way2sms网关从我的网站向任何手机号码发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文