通过网站发送短信到手机 [英] Send SMS through website to mobile

查看:89
本文介绍了通过网站发送短信到手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了以下代码来发送短信,它可以在LAN上工作,但是在WAN或MAN上却不工作

I have write following code to send sms,it will work on LAN,but on WAN or MAN it will not work

Label sms = new Label();
sms.Text = name.Text + "  has enquired for " + ddlInterest .SelectedValue  ;
string strUrl = "http://?user=user:pass&senderID=TD&receipientno= txtMob.text &msgtxt= " + sms.Text + " ";
WebRequest request = HttpWebRequest.Create(strUrl);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream s = (Stream)response.GetResponseStream();
StreamReader readStream = new StreamReader(s);
string dataString = readStream.ReadToEnd();
response.Close();
s.Close();
readStream.Close();
Literal1.Text = "Your Enquiry is submitted";

推荐答案

我相信,通过更改跟随行可以解决您的问题:

更改此内容:
I believe by changing the followin line your issue will be resolved:

Change this:
string strUrl = "http://?user=user:pass&senderID=TD&receipientno= txtMob.text &msgtxt= " + sms.Text + " ";


收件人:


To:

string strUrl = "http://www.site.com?user=user:pass&senderID=TD&receipientno= txtMob.text &msgtxt= " + sms.Text + " ";


网址中唯一的区别是站点地址.

希望这会对您有所帮助


The only difference in the url is site address.

Hope this will help you out


这篇关于通过网站发送短信到手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆