通过HTTP80端口发送手机短信

由于联系的手机厂商为只能提供从HTTP80端口发送信息,故对此编写了以下代码:

    string MobileNo = "";//手机号码
           string MsgContent = "";//短信内容
                WebProxy myproxy = new WebProxy("172.22.252.66:80", true);
                myproxy.Credentials = new NetworkCredential("Yong-Chao_Lu", "!lyc760408", "maintek");

                string[] MobileCode = MobileNo.Split(';');

                foreach (string curCode in MobileCode)
                {

                    if (curCode.Trim().Length > 8)//号码长度判断
                    {
                        WebRequest WReq;
                        WebResponse WResp;
                        string url = "http://221.224.134.226/guanshuo/insert.asp?tel_no=" + curCode + "&content=" + MsgContent + "&user_name=客户名称&user_IP=客户标识";
                        WReq = WebRequest.Create(url);
                        WReq.Proxy = myproxy;
                        WResp = WReq.GetResponse();
                    }
                }

相关文章:

  • 2021-07-06
  • 2021-05-20
  • 2021-12-22
  • 2022-12-23
  • 2021-11-21
  • 2021-06-03
  • 2021-07-14
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2021-09-29
  • 2022-01-04
  • 2022-02-07
  • 2021-11-30
  • 2021-07-09
相关资源
相似解决方案