<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

    色88久久久久高潮综合影院| 久久久久久久免费视频| 久久国产免费一区二区三区| 麻豆AV一区二区三区久久| 国产精品成人久久久| 国产精品成人久久久久三级午夜电影 | 久久人人超碰精品CAOPOREN| 久久精品中文字幕久久| 久久久久亚洲AV无码麻豆| 97久久国产露脸精品国产| 精品熟女少妇av免费久久| 精品人妻潮喷久久久又裸又黄| 久久亚洲色一区二区三区| 99精品久久99久久久久久| 久久精品国产只有精品2020| 亚洲欧洲久久av| 国产精品久久久久久久福利院| 久久精品视频免费| 久久久久久久亚洲精品| 免费精品久久久久久中文字幕| 久久精品成人免费网站| 国产精品内射久久久久欢欢| 色偷偷91综合久久噜噜| 性做久久久久久久久浪潮| 久久久久久综合网天天| 久久婷婷激情综合色综合俺也去| 久久综合色天天久久综合图片| 久久艳务乳肉豪妇荡乳a片| 久久成人无码国产免费播放| 精品国产乱码久久久久久鸭王1 | 中文字幕精品久久| 久久国产香蕉一区精品| 99久久无码一区人妻a黑| 久久精品人人爽人人爽快| 久久福利青草精品资源站| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 久久福利资源国产精品999| 精品免费久久久久久久| 亚洲国产美女精品久久久久| 国产成人精品综合久久久久| 狠狠久久综合伊人不卡|