zoukankan      html  css  js  c++  java
  • 微信获取短信验证码

    //发送验证码

    string param = "action=send&userid=****&account=******password=***&content=" + "【签名】+内容+ "&mobile=" 手机号 "&sendtime=";
    if (CheckBox1.Checked)//是否定时发送
    {
    param = param + TextBox4.Text; //
    }
    else
    {
    param = param + "";//不需要定时发送,也需要带上""
    }
    byte[] bs = Encoding.UTF8.GetBytes(param);

    HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("http://client.movek.net:8888/sms.aspx?"+param);
    req.Method = "POST";
    req.ContentType = "application/x-www-form-urlencoded";
    req.ContentLength = bs.Length;

    using (Stream reqStream = req.GetRequestStream())
    {
    reqStream.Write(bs, 0, bs.Length);
    }
    using (WebResponse wr = req.GetResponse())
    {
    StreamReader sr = new StreamReader(wr.GetResponseStream(), System.Text.Encoding.UTF8);

    TextBox3.Text = sr.ReadToEnd().Trim();
    }

    //查询余额

    string param = "userid=****&account=********&password=****&action=overage";
    byte[] bs = Encoding.UTF8.GetBytes(param);

    HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("http://client.movek.net:8888/sms.aspx?" + param);
    req.Method = "POST";
    req.ContentType = "application/x-www-form-urlencoded";
    req.ContentLength = bs.Length;

    using (Stream reqStream = req.GetRequestStream())
    {
    reqStream.Write(bs, 0, bs.Length);
    }
    using (WebResponse wr = req.GetResponse())
    {
    StreamReader sr = new StreamReader(wr.GetResponseStream(), System.Text.Encoding.UTF8);

    TextBox3.Text = sr.ReadToEnd().Trim();
    }

  • 相关阅读:
    poj2411 状压dp
    棋盘覆盖TYVJ1035(二分图最大匹配)
    poj3417
    无向图边双+缩点
    无向图点双+缩点
    bzoj1123(割点加路径统计)
    【BZOJ1178】会议中心(APIO2009)-贪心+倍增+set
    【BZOJ4650】优秀的拆分(NOI2016)-后缀数组+RMQ+差分
    【BZOJ4569】萌萌哒(SCOI2016)-并查集+倍增
    【BZOJ2208】连通数(JSOI2010)-SCC+DP+bitset
  • 原文地址:https://www.cnblogs.com/yyangjing/p/7551293.html
Copyright © 2011-2022 走看看