您的位置:首页 > 编程语言 > C#

基于C#的短信接口调用示例代码模板

2016-10-27 11:07 471 查看
using System; 

using System.Collections.Generic; 

using System.Linq; 

using System.Text; 

using System.Net.Security; 

usingSystem.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 CLR2.0.50727)"; 

 

       private static bool CheckValidationResult(object sender, X509Certificatecertificate, X509Chain chain, SslPolicyErrors errors) 

       { 

           return true; //总是接受    

       } 

        static void Main(string[] args) 

       { 

           DateTime dt = DateTime.Now;

           string mttime = dt.ToString("yyyyMMddHHmmss");

           string pwd1 = "*************"+mttime;

     string pwd = GetMD5(pwd1)

           string content = "【阅信短信平台】验证码888888,打死也不能告诉别人哦。";

            string url = "http://IP/端口号";

这是之前给阅信短信平台写的基于C#的短信接口调用示例代码模板,相信很多同行在做开发时都会遇到用户注册验证的需求,阅信短信平台的短信验证和语音验证在业内均属于较高的水准,感兴趣的朋友可以去免费测试下。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  api 短信 验证码 安全 c#