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

  • <dl id="4qa46"><acronym id="4qa46"></acronym></dl>
    <rt id="4qa46"></rt>
    <abbr id="4qa46"><tbody id="4qa46"></tbody></abbr>
  • ASP.NET(C#)

    ASP.NET(C#)代碼示例

    //接口類型:達(dá)信通國(guó)際短信接口。
    //賬戶注冊(cè):請(qǐng)通過(guò)該地址開(kāi)通賬戶http://sms.wx96.com/register.html
    //注意事項(xiàng):
    //(1)調(diào)試期間,請(qǐng)仔細(xì)閱讀接口文檔;
    //(2)請(qǐng)使用 用戶名(例如:cf_demo123)及 APIkey來(lái)調(diào)用接口,APIkey在會(huì)員中心可以獲取;
    //(3)該代碼僅供接入達(dá)信通短信接口參考使用,客戶可根據(jù)實(shí)際需要自行編寫(xiě);
     
    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)登錄用戶中心->國(guó)際短信->帳戶參數(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èn)失
         }     
    } 
    }
    
    在線咨詢
    電話咨詢

    服務(wù)熱線:

    4008 808 898

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

    4008 808 898

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

    4008 808 898

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

    4008 808 898

    91精品国产91久久久久| 久久国产精品免费| 狠狠色丁香久久婷婷综| 亚洲色欲啪啪久久WWW综合网| 久久精品视频免费看| 国产成人高清亚洲一区久久| 久久婷婷五月综合色高清 | 久久久久久精品久久久 | 2021国产精品久久| 精品999久久久久久中文字幕| 无码八A片人妻少妇久久| 久久精品中文字幕第一页| 一本久道久久综合中文字幕| 精品久久久久久久久免费影院| 久久精品日日躁精品| 久久精品?ⅴ无码中文字幕| 亚洲国产精品无码久久九九大片 | 香蕉久久综合精品首页| 少妇久久久久久人妻无码| 香蕉久久一区二区不卡无毒影院 | 97精品伊人久久大香线蕉| 日本强好片久久久久久AAA| 手机看片福利久久| 亚洲国产香蕉人人爽成AV片久久 | 久久99久久精品视频| 国内高清久久久久久| 无码人妻少妇久久中文字幕| 亚洲日本久久一区二区va| 久久99精品一区二区三区| 国产精品一区二区久久不卡| 久久93精品国产91久久综合| 99久久精品国产第一页| 日韩精品久久久久久久电影| 久久水蜜桃亚洲av无码精品麻豆 | 国产成人精品久久亚洲高清不卡 | 一级做a爱片久久毛片| 久久97精品久久久久久久不卡| 久久精品成人影院| 亚洲国产一成久久精品国产成人综合| 色偷偷人人澡久久超碰97| 国产国产成人精品久久|