• C# Http短信接口的调用~~~~~~~~


    短信平台接口调用实现: 

    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 = "URL?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();         }

    永远也不要消极地认为做什么事是不可能的,只要你认 为你能, 尝试, 尝试, 再尝试, 最终你都发现你能。
  • 相关阅读:
    CentOS 7.4 如何安装 MariaDB 10.3.9 Stable 数据库
    xxx is not in the sudoers file. This incident will be reported.
    CentOS 7.4 上如何安装 tomcat 9
    CentOS 7.4 下面安装 jdk 10 的一点总结
    CentOS 7.4 下安装 Nginx
    MySQL数据库常用操作
    chart学习
    Ext需要的文件目录
    获取浏览器信息
    运行容器
  • 原文地址:https://www.cnblogs.com/zhangmu/p/3556994.html
Copyright © 2020-2023  润新知