题
我建立一个桌面应用程序在视觉C#2.0,可以通过发送短信way2sms.com.有人对你已经试过这样的事情...?请帮助。
解决方案
此链接有一个解决方案
http://www.aswinanand.com/2008/07/send-free-sms-web-service/
我们可以将参数传递给Web请求类提供的URL。我做了以下行
HttpWebRequest request = (HttpWebRequest) WebRequest.Create("_http://www.aswinanand.com/sendsms.php?uid=" + this.txtUserID.Text + "&pwd=" + this.txtPassword.Text + "&phone=" + this.txtToMobileNo.Text + "&msg=" + this.txtMessage.Text);
StreamReader reader = new StreamReader(request.GetResponse().GetResponseStream(), Encoding.UTF8);
return reader.ReadToEnd();
Java中有另一个工具可用 http://way2sms.codeplex.com/, ,我现在正在C#中实施。
其他提示
从不使用Way2SM。我使用了Clickatell。即使在网络服务器上,它也很棒。
这是一篇关于在C#中发送SMS的好文章
我。开发了一个api的way2sms和其他供应商可直接使用的每个人都..检查出来的 http://ubaid.tk/sms/
你可以使用该网页由我创造的,或者可能使用api结构。。例如,应用程序可以直接前的请求
http://ubaid.tk/sms/sms.aspx?uid=99999xxxxx&pwd=12345&msg=your 短信的文本,你想要2发送和电话=9996669990&provider=way2sms
where uid是way2sms userid, pwd是way2sms密码,消息是你的消息,这需要发送的,电话是的电话号码啦妳想要发送短信..在不同提供者way2sms,fullonsms,smsinside和tezsms..
工作的100%,所有的时间。:)
干杯..
为此,您需要输入SMS的API并集成在ASP.NET应用程序中。
>> Where YOUR_USERNAME your way2sms/160by2/fullonsms/sms440/site2sms USERNAME(ie mobile number)
>>Where YOUR_PASSWORD your way2sms/160by2/fullonsms/sms440/site2sms PASSWORD.
>> Where YOUR_RECEPTIANT is to which number you want to send SMS.
>> Where YOUR_MESSAGE is the message you want to send.
>> Where YOUR_GATEWAY is way2sms/160by2/fullonsms/sms440/site2sms.
string connectionString = "<a href="http://alfasms.alfredfrancis.in/?uname=YOUR_USERNAME&pass=YOUR_PASSWORD&to=YOUR_RECEPTIANT&mess=YOUR_MESSAGE&gateway=YOUR_GATEWAY">http://alfasms.alfredfrancis.in/?uname=YOUR_USERNAME&pass=YOUR_PASSWORD&to=YOUR_RECEPTIANT&mess=YOUR_MESSAGE&gateway=YOUR_GATEWAY</a>";
try
{
System.IO.Stream SourceStream = null;
System.Net.HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(connectionString);
myRequest.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse webResponse = (HttpWebResponse)myRequest.GetResponse();
SourceStream = webResponse.GetResponseStream();
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
string str = reader.ReadLine();
}
catch (Exception ex)
{
}
请拜访
http://mohanramphp.kodingen.com/blog/2011/01/13/send-free-sms-prree-sms-%E2%80%93-web-service/
现在 aswinanand
发送SMS的代码不活动。
发送短信的用法在博客中给出。
简短的用法:
http://mohanramphp.elementfx.com/sms/index.php?uid=9933445566&pwd=password&phone = 9812345678;99933445566&mmsg =这些是样本消息