• 使用短信通/微米发短信


    http://www.duanxin.cm/

        class Program
        {
            static string url = "http://180.97.163.89:8012/OpenPlatform/OpenApi";
            static void Main(string[] args)
            {
             
                var t = Task.Run(() => PostMessage());
                t.Wait();
    
    
    
            }
    
            public static async Task PostMessage()
            {
                var pairs = new List<KeyValuePair<string, string>>
                            {
                                new KeyValuePair<string, string>( "action", "sendOnce" ), 
                                new KeyValuePair<string, string>( "ac", "1001@" ), 
                                new KeyValuePair<string, string>( "authkey", "D5528AA2EEED774746754FF9CE36DA8D" ), 
                                new KeyValuePair<string, string>( "cgid", "6" ), 
                                new KeyValuePair<string, string> ( "c", "感谢您使用 爱考位 订单代报,您的订单号是:034421" ),
                                new KeyValuePair<string, string> ( "m", "13429329134" )
                            };
                var content = new FormUrlEncodedContent(pairs);
                using (var client = new HttpClient())
                {
                    var response =
                        await client.PostAsync(url, content);
                    string jsonMessage = await response.Content.ReadAsStringAsync();
                }
    
            }
        }

     http://www.weimi.cc/

    string mobile = "<enter your mobiles>",
    cid = "<enter your cid>",
    uid = "<enter your UID>",
    pas = "<enter your UID Pass>",
    url = "http://api.weimi.cc/2/sms/send.html"; 
    byte[] byteArray = Encoding.UTF8.GetBytes("mob=" + mobile + "&cid=" + cid + "&uid=" + uid + "&pas=" + pas + "&type=json");
    HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(new Uri(url));
    webRequest.Method = "POST";
    webRequest.ContentType = "application/x-www-form-urlencoded";
    webRequest.ContentLength = byteArray.Length;
    Stream newStream = webRequest.GetRequestStream();
    newStream.Write(byteArray, 0, byteArray.Length);
    newStream.Close();
    HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();
    StreamReader php = new StreamReader(response.GetResponseStream(), Encoding.Default);
    string Message = php.ReadToEnd();
    System.Console.Write(Message);
    System.Console.Read();
  • 相关阅读:
    django-filter 使用Filter来筛选你的数据
    Django REST framework
    利用WSGI来部署你的网站
    [GitPython]使用python管理你的git库
    [模拟炉石](三)使用卡牌
    简单说pyglet.event
    [模拟炉石](二)下一步要解决的问题
    [模拟炉石](一)让游戏过程显示到cocos2d中
    docker系列之一:初见docker
    二分查找_递归实现_存在重复元素
  • 原文地址:https://www.cnblogs.com/tgdjw/p/5335842.html
Copyright © 2020-2023  润新知