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

  • <dl id="4qa46"><acronym id="4qa46"></acronym></dl>
    <rt id="4qa46"></rt>
    <abbr id="4qa46"><tbody id="4qa46"></tbody></abbr>
  • 您是否正受到短信簽名報(bào)備的困擾?達(dá)信通解決方案讓您最快15分鐘內(nèi)恢復(fù)信息傳遞,馬上 注冊(cè)體驗(yàn)

    ASP.NET(C#)

    ASP.NET(C#)代碼示例

    //接口類型:達(dá)信通國際短信接口。
    //賬戶注冊(cè):請(qǐng)通過該地址開通賬戶http://sms.wx96.com/register.html
    //注意事項(xiàng):
    //(1)調(diào)試期間,請(qǐng)仔細(xì)閱讀接口文檔;
    //(2)請(qǐng)使用 用戶名(例如:cf_demo123)及 APIkey來調(diào)用接口,APIkey在會(huì)員中心可以獲取;
    //(3)該代碼僅供接入達(dá)信通短信接口參考使用,客戶可根據(jù)實(shí)際需要自行編寫;
     
    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賬號(hào)名(例如:cf_demo123)
            string password = "密碼";//查看密碼請(qǐng)登錄用戶中心->國際短信->帳戶參數(shù)設(shè)置->APIKEY
            string mobile = "136xxxxxxxx";//手機(jī)號(hào)碼
            string content = "Your verification code is 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();
                   //Response.Write(res);
                   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         {
                 //訪問失
         }     
    } 
    }
    
    在線咨詢
    電話咨詢

    服務(wù)熱線:

    4008 808 898

    服務(wù)熱線(工作時(shí)間):

    4008 808 898

    業(yè)務(wù)咨詢(非工作時(shí)間):

    4008 808 898

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

    4008 808 898

    精品午夜久久网成年网| 久久一本岛在免费线观看2020| 久久精品九九亚洲精品| 国内精品伊人久久久久网站| 青青国产成人久久激情911| 久久久久久亚洲AV无码专区| 国产精品国色综合久久| 久久国产成人午夜aⅴ影院| 色综合久久天天综合绕观看| 精品国产一区二区三区久久久狼| 久久精品国产亚洲夜色AV网站| 久久综合色之久久综合| 国产精品美女久久久网站动漫| 97久久超碰国产精品2021| 久久亚洲AV成人出白浆无码国产| 久久这里只有精品首页| 久久成人18免费网站| 一本一本久久a久久精品综合麻豆 一本色道久久综合狠狠躁篇 | 国内精品久久久久| 精品久久久久久无码人妻蜜桃| 日本精品无码一区二区三区久久久 | 国产ww久久久久久久久久| 午夜精品久久久久久影视riav| 久久久久久九九99精品| 久久久精品人妻一区亚美研究所| 亚洲中文久久精品无码ww16| 精品综合久久久久久88小说| 青青草国产97免久久费观看| 无码av大香线蕉伊人久久| 精品国产线拍大陆久久尤物| 亚洲午夜无码久久久久软件| 亚洲日本VA中文字幕久久道具| 亚洲人成电影网站久久| 国产精品一久久香蕉国产线看| 久久精品无码午夜福利理论片| 日日躁夜夜躁狠狠久久AV| 久久一区二区三区免费播放| 久久亚洲国产成人精品性色| 亚洲国产精品热久久| 蜜臀久久99精品久久久久久小说 | 一本狠狠久久五月色丁香|