基于C#的短信接口调用示例代码模板
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Net;
using System.IO;
using System.IO.Compression;
using System.Text.RegularExpressions;
using System.Security.Cryptography;
using System.Web;
public class Test
{
private static readonly string DefaultUserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
private static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
return true; //总是接受
}
static void Main(string[] args)
{
DateTimedt = DateTime.Now;
string mttime = dt.ToString("yyyyMMddHHmmss");
string pwd1 = "0220cf1a23a76948eeff3d7c3a4b7e51"+mttime;
string pwd = GetMD5(pwd1);