<pre id="4qa46"></pre>

  • <dl id="4qa46"><acronym id="4qa46"></acronym></dl>
    <rt id="4qa46"></rt>
    <abbr id="4qa46"><tbody id="4qa46"></tbody></abbr>
  • 您是否正受到短信簽名報備的困擾?達信通解決方案讓您最快15分鐘內恢復信息傳遞,馬上 注冊體驗

    ASP.NET(C#)

    ASP.NET(C#)代碼示例

    //接口類型:達信通語音驗證碼接口。
    //賬戶注冊:請通過該地址開通賬戶http://sms.wx96.com/register.html
    //注意事項:
    //(1)調試期間,請仔細閱讀接口文檔;
    //(2)請使用 用戶名(例如:cf_demo123)及 APIkey來調用接口,APIkey在會員中心可以獲取;
    //(3)該代碼僅供接入達信通短信接口參考使用,客戶可根據實際需要自行編寫;
     
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.IO;
    using System.Net;
    using System.Text;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
     
    public partial class Post : System.Web.UI.Page
    {
        public static string PostUrl = ConfigurationManager.AppSettings["WebReference.Service.PostUrl"];
        protected void Page_Load(object sender, EventArgs e)
        {
            string account = "用戶名";//用戶名是登錄wx96.com賬號名(例如:cf_demo123)
            string password = "密碼";//查看密碼請登錄用戶中心->語音驗證碼->帳戶參數設置->APIKEY
            string mobile = "136xxxxxxxx";//手機號碼
            string content = "1125";
            string postStrTpl = "account={0}&password={1}&mobile={2}&content={3}";
     
            UTF8Encoding encoding = new UTF8Encoding();
            byte[] postData = encoding.GetBytes(string.Format(postStrTpl, account, password, mobile, content));
     
            HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(PostUrl);
            myRequest.Method = "POST";
            myRequest.ContentType = "application/x-www-form-urlencoded";
            myRequest.ContentLength = postData.Length;
     
            Stream newStream = myRequest.GetRequestStream();
            // Send the data.
            newStream.Write(postData, 0, postData.Length);
            newStream.Flush();
            newStream.Close();
     
            HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
            if (myResponse.StatusCode == HttpStatusCode.OK)
            {
                StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
     
                   string res = reader.ReadToEnd();
                   int len1 = res.IndexOf("/code>");
                   int len2 = res.IndexOf("code>");
                   string code=res.Substring((len2+6),(len1-len2-6));
                   //Response.Write(code);
                   int len3 = res.IndexOf("/msg>");
                   int len4 = res.IndexOf("msg>");
                   string msg=res.Substring((len4+5),(len3-len4-5));
                   Response.Write(msg);
                   Response.End();
               }else{
                    //訪問失敗
               }
           }
       }
    
    
    在線咨詢
    電話咨詢

    服務熱線:

    4008 808 898

    服務熱線(工作時間):

    4008 808 898

    業務咨詢(非工作時間):

    4008 808 898

    售后咨詢(非工作時間):

    4008 808 898

    亚洲午夜久久久影院| 久久成人麻豆午夜电影| 二区久久国产乱子伦免费精品| 91精品久久久久久无码| 久久精品中文字幕第一页| 久久er国产精品免费观看8| 久久久久亚洲AV无码去区首| 久久男人Av资源网站无码软件| 亚洲中文字幕无码一久久区| 国产视频精品久久| 亚洲综合久久一本伊伊区| 亚洲成人精品久久| 久久精品国产91久久综合麻豆自制| 四虎影视久久久免费观看| 无码人妻久久一区二区三区免费丨| 久久精品人成免费| 久久免费观看国产精品| 精品久久久久久久| 尹人久久久香蕉精品| 国产成人精品久久亚洲| 色综合久久中文字幕综合网| 少妇被又大又粗又爽毛片久久黑人| 久久天天躁夜夜躁狠狠| 99国产精品热久久久久久| 久久中文字幕2021精品| 亚洲va中文字幕无码久久| 久久99毛片免费观看不卡| 伊人久久精品无码二区麻豆| 久久精品国产亚洲5555| 九九久久国产精品| 九九久久久久午夜精选| www.久久精品| 国产成人精品久久综合| 亚洲精品无码久久毛片| 久久国产热这里只有精品| 久久99精品久久久久久野外| 国产精品成人无码久久久久久 | 思99热精品久久只有精品| 久久精品国产99国产精品| 国产精品伦理久久久久久| 一本大道加勒比久久|