<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#)代碼示例

    //接口類型:達信通語音通知接口。
    //賬戶注冊:請通過該地址開通賬戶http://sms.wx96.com/register.html
    //注意事項:
    //(1)調試期間,請仔細閱讀接口文檔;
    //(2)請使用APIID(查看APIID請登錄用戶中心->語音通知->帳戶及簽名設置->APIID)及 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 = "用戶名";//用戶名是登錄用戶中心->語音通知->帳戶參數設置->APIID
            string password = "密碼";//查看密碼請登錄用戶中心->語音通知->帳戶參數設置->APIKEY
            string mobile = "136xxxxxxxx";//手機號碼
            string content = "您的訂單號是:0648。已由順風快遞發出,請注意查收。";
    		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("");
                   int len2 = res.IndexOf("");                string code=res.Substring((len2+6),(len1-len2-6));                Response.Write(code);                 int len3 = res.IndexOf("");                int len4 = res.IndexOf("");                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

    国产精品一区二区久久精品| 九九久久精品国产AV片国产| 久久99热国产这有精品| 久久久久久亚洲av无码蜜芽| 久久久久无码国产精品一区| 很黄很污的网站久久mimi色| 亚洲精品午夜久久久伊人| 国产午夜福利精品久久2021| 精品无码成人网站久久久久久| 久久天天躁狠狠躁夜夜96流白浆 | 中文字幕一区二区三区久久网站 | 亚洲精品无码久久久影院相关影片| 伊人涩涩涩涩久久久AV| 日本强好片久久久久久AAA| 久久免费国产精品| 日日AV拍夜夜添久久免费| 91精品国产91久久久久久青草| 久久爰www免费人成| 久久人人爽人爽人人爽av| 色综合久久加勒比高清88| 久久九九兔免费精品6| 久久久久大香线焦| 精品久久久久久国产| 亚洲精品乱码久久久久久不卡| 亚洲中文字幕无码久久2020| 久久精品人成免费| 午夜久久久久久禁播电影| 久久狠狠色狠狠色综合| 久久精品国产国产精品四凭| 蜜桃久久久久久久久久久| 久久天天婷婷五月俺也去| 97久久精品亚洲中文字幕无码 | 国产精品美女久久久浪潮av| 午夜精品久久久久久影视riav| 久久99国产精品尤物| 日韩乱码人妻无码中文字幕久久| 久久精品国产精品| 日本久久久精品中文字幕| 伊人久久大香线焦AV综合影院| 中文字幕久久久久久久系列| 久久www免费人成精品香蕉|