日本欧美国产精品第一页久久-日本欧美韩国一区二区三区-日本欧美韩国专区-日本欧美久久久久免费播放网-同性男男黄h片在线播放免费-同性欧美可播放videos免费

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

主站蜘蛛池模板: 亚洲欧美一区二区久久香蕉 | 日本精品三级 | 久久国产成人精品 | 视频一区 欧美 | 亚洲综合国产精品 | 男人看片网址 | 91精品一区二区三区在线观看 | 精品一区二区三区免费观看 | 成人免费aaaaa毛片 | 高清不卡日本v在线二区 | 大学生久久香蕉国产线观看 | 波多野结衣在线观看3人 | 可以看毛片的网址 | 99久久免费看国产精品 | 久久精品国产屋 | 精品日韩二区三区精品视频 | 成人免费高清视频网址 | 国产亚洲精品久久久久久无 | 91网站在线免费观看 | 亚洲国产精品久久久久666 | 国内精品小视频 | 一级做a爰片性色毛片视频图片 | 欧美三级在线 | 韩日精品| 亚洲一区二区三区国产精品 | 午夜成人在线视频 | 最新主播福利视频在线观看 | 美女视频网站永久免费观看软件 | 欧美操操操 | 亚洲毛片免费看 | 欧美精品成人一区二区在线观看 | 久久精品免费观看视频 | 久草中文在线 | 美国一级做a一级视频 | 91香蕉国产线在线观看免费 | 欧美成人区 | 欧美啊啊啊 | 欧美刺激午夜性久久久久久久 | 久久免费手机视频 | 在线视频一二三区2021不卡 | 91成年人免费视频 |