<nav id="ckusc"></nav>
<menu id="ckusc"><acronym id="ckusc"></acronym></menu>
<input id="ckusc"><u id="ckusc"></u></input>
<menu id="ckusc"></menu>
<input id="ckusc"><u id="ckusc"></u></input>
  • <input id="ckusc"></input>
  • <input id="ckusc"></input>
  • <menu id="ckusc"><u id="ckusc"></u></menu> <nav id="ckusc"><tt id="ckusc"></tt></nav>
  • <legend id="ckusc"></legend>
  • <menu id="ckusc"></menu>
  • <input id="ckusc"></input>
    代码示例

    代码下载C#代码示例 在线技术支持

    	void SendSms(String accName,String accPwd,String aimcodes,String content)
    	{
    	    string formUrl = "http://www.zgpmsmcom.cn/sdk/send";//url地址
    	    string ReStr;
            //参数
            string formData="" ;
            DateTime Date= DateTime.Now;
    
            formData = formData +  "&accName=" +accName.Trim() + 
            	"&accPwd=" + MD5Encrypt32(accPwd.Trim())+
            	"&content=" +content.Trim() + 
            	"&aimcodes=" +aimcodes.Trim(); 
    
            CookieContainer cookieContainer = new CookieContainer();
            // 将提交的字符串数据转换成字节数组
            //byte[] postData = Encoding.UTF8.GetBytes(formData);
            Encoding myc= Encoding.GetEncoding("UTF-8");
            byte[] postData =myc.GetBytes(formData);
            // 设置提交的相关参数
            HttpWebRequest request = WebRequest.Create(formUrl) as HttpWebRequest;
            Encoding myEncoding = Encoding.GetEncoding("UTF-8");
            request.Method = "POST";
            request.KeepAlive = false;
            request.AllowAutoRedirect = true;
            request.ContentType = "application/x-www-form-urlencoded";
            request.CookieContainer = cookieContainer;
            request.ContentLength = postData.Length;
    
            // 提交请求数据
            System.IO.Stream outputStream = request.GetRequestStream();
            outputStream.Write(postData, 0, postData.Length);
            outputStream.Close();
    
            HttpWebResponse response;
            Stream responseStream;
            StreamReader reader;
            string srcString;
            response = request.GetResponse() as HttpWebResponse;
            responseStream = response.GetResponseStream();
            reader = new System.IO.StreamReader(responseStream, Encoding.UTF8);
            ReStr = reader.ReadToEnd(); //返回值
            Console.WriteLine( "错误信息:" + ReStr);
            reader.Close();		
    	}
    	//MD5加密
    	public static string MD5Encrypt32(string password)
            {
                string strEncrypt = string.Empty;
                strEncrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(password, "MD5");
                return strEncrypt; 
            }
    
    最新一本道-斉木ゆあ