短信平台接口调用实现:
private void SendSMS(string phone) {
string content = "欢迎登陆婚庆网!执子之手,与之偕老!";
content = HttpUtility.UrlEncode(content, System.Text.Encoding.GetEncoding("UTF-8"));
string account = "test"; //短信平台用户的名称
string pass = "123"; //短信平台 用户的密码
string uid = "1289"; //短信平台用户的ID号
string url = "http://www.lcqxt.com/sms.aspx?action=send&userid=" + uid + "&account=" + account + "&password=" + pass + "&mobile=" + phone + "&content=" + content + "&sendTime=&checkcontent=0";
WebRequest wRequest = WebRequest.Create(url);
WebResponse wResponse = wRequest.GetResponse();
Stream stream = wResponse.GetResponseStream();
StreamReader reader = new StreamReader(stream, System.Text.Encoding.Default);
string r = reader.ReadToEnd();
wResponse.Close(); }
原文:http://www.cnblogs.com/zhangmu/p/3556994.html