<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

    九九免费久久这里有精品23| 婷婷久久久亚洲欧洲日产国码AV | a级**毛片看久久| 99久久综合国产精品免费| 久久精品亚洲日本佐佐木明希| av一本久道久久综合久久鬼色| 怡红院日本一道日本久久| 久久久久成人精品一区二区 | 亚洲国产成人久久77| 国产∨亚洲V天堂无码久久久| 九九久久精品国产免费看小说| 怡红院日本一道日本久久| 久久精品人成免费| 久久久久久国产精品免费免费男同 | 亚洲国产成人久久综合一区77| 亚洲精品第一综合99久久| 伊人丁香狠狠色综合久久| 精品久久久久久综合日本| 国产激情久久久久影院| 精品久久中文字幕有码| 亚洲国产精品无码久久九九大片 | 国产成人AV综合久久| 精品久久久无码人妻中文字幕豆芽| 久久久久青草线蕉综合超碰| 婷婷久久香蕉五月综合加勒比| 久久无码专区国产精品| 久久精品韩国三级| 亚洲精品无码久久一线| 久久久久国产精品嫩草影院| 丁香狠狠色婷婷久久综合| 国产乱人伦app精品久久| 精品熟女碰碰人人a久久| 精品久久久久国产免费| 久久久久国产精品免费免费搜索| 国产精品久久久久久久人人看 | 精品久久中文字幕| 精品久久久BBBB人妻| 国产精品成久久久久三级| 国产精品久久久久9999赢消| 一本综合久久国产二区| 国产999精品久久久久久|