<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

    国产精品揄拍一区二区久久| 国产成人综合久久综合| 久久人午夜亚洲精品无码区 | 久久国产一久久高清| 亚洲伊人久久大香线蕉结合| 久久精品国产免费| 91久久精品国产免费直播| 一本大道久久香蕉成人网| 久久青草精品38国产免费| 久久人人超碰精品CAOPOREN | 久久99久久99精品| 精品综合久久久久久97| 九九久久99综合一区二区| 国产精品久久久久久久久久久搜索| 久久这里只有精品久久| 国产成人久久久精品二区三区| 久久99国产视频| 久久精品国产精品亚洲精品| 国产农村妇女毛片精品久久| 精品无码久久久久久久久水蜜桃| 久久国产乱子免费精品| 囯产极品美女高潮无套久久久| 中文字幕无码免费久久99| 久久国产一区二区| 久久亚洲AV无码西西人体| 国内精品久久久久影院蜜芽| 久久亚洲精品国产亚洲老地址| 久久久久久综合一区中文字幕| 国产一区二区精品久久凹凸| 亚洲精品无码成人片久久不卡| 亚洲av无码不卡久久| 99热精品久久只有精品30| 久久久网中文字幕| 亚洲中文字幕伊人久久无码| 国产91久久久久久久免费| 色综合久久一本首久久| 久久久精品人妻一区二区三区蜜桃| 久久精品国产清自在天天线| 狠狠色丁香久久婷婷综合图片 | 免费看一级做a爰片久久| 色综合久久加勒比高清88|