<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

    久久精品免费电影| 久久精品国产99久久香蕉| 久久香蕉国产线看观看99| 久久精品国产亚洲av天美18| 久久天天躁狠狠躁夜夜中文字幕 | 久久国产AVJUST麻豆| 久久午夜夜伦鲁鲁片无码免费| 亚洲精品美女久久久久99小说| 久久精品国产男包| 久久免费观看国产精品| 久久久久久毛片免费看| 国产精品视频久久久久久| 精品国产乱码久久久久久呢| 久久国产成人精品| 韩国无遮挡三级久久| 久久精品国产一区二区三区不卡| 少妇高潮惨叫久久久久久电影| 久久99热精品免费观看牛牛| 中文字幕精品久久| 久久激情亚洲精品无码?V| 国产美女久久久久| 中文字幕久久久久久精品| 亚洲熟妇无码久久精品| 99久久亚洲综合精品成人网| 久久精品中文字幕第一页| 久久99热狠狠色精品一区| 久久久久久极精品久久久 | 国产av无码久久精品| 亚洲精品乱码久久久久蜜桃| 久久国产亚洲高清观看| 久久久久久久极品内射| 国产精品99久久免费观看| 亚洲精品无码成人片久久| 国内精品人妻无码久久久影院导航| 亚洲精品无码久久久久AV麻豆| 国产91精品久久久久久久| 精品久久久久久无码中文字幕漫画| 狠狠色丁香婷婷久久综合五月 | 香蕉久久精品日日躁夜夜躁| 久久99久国产麻精品66| 国产精品久久久久9999高清|