<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

    久久久久久夜精品精品免费啦| 国内精品久久久久久影院| 久久99精品久久久久久野外| 久久国产色AV免费看| 久久99久久99小草精品免视看| 永久久久免费浮力影院| 久久久久久伊人高潮影院| 九九99精品久久久久久| 久久91这里精品国产2020| 亚洲精品乱码久久久久蜜桃| 日韩精品久久无码人妻中文字幕 | 午夜一级做a爰片久久毛片| 99精品国产在热久久婷婷| 久久久久国产一级毛片高清版| 国产一区二区福利久久| 久久99热这里只频精品6| 久久综合88熟人妻| 久久成人无码国产免费播放 | 国产精品久久精品| 无码人妻久久一区二区三区| 久久精品国产一区二区三区日韩| 人妻免费久久久久久久了| 久久青青草原一区二区| 久久精品国产久精国产一老狼| 亚洲av成人无码久久精品 | 人妻精品久久无码专区精东影业| 久久国产高清字幕中文| 国内精品久久久久久久亚洲| 精品99久久aaa一级毛片| 一本久久综合亚洲鲁鲁五月天| 亚洲精品无码久久久久秋霞| 久久99久国产麻精品66| 91精品国产免费久久国语蜜臀| 无码人妻久久一区二区三区免费| 久久天天躁狠狠躁夜夜爽| 嫩草影院久久国产精品| 狠狠狠色丁香婷婷综合久久俺| 伊人久久综合精品无码AV专区| 久久精品国产亚洲5555| 久久九九久精品国产| 久久精品免费大片国产大片|