JS短信接口,程序猿技术交流贴,普通商家不用看

2018-06-19 10:03:04      作者:必到牌软件
这篇文章主要为大家分享JS短信接口代码,JS短信发送、JS批量发送、JS短信验证码发送,感兴趣的小伙伴们可以参考一下。
功能:JS短信接口、JS发送短信
用途:短信验证码、会员营销短信、各类通知短信
群发短信
怎么吸引顾客非常重要,我知道的一些店家,经常用必到牌软件怎样群发短信给顾客,和顾客保持长期的联系,不光经常给店内会员发促销手机短信,还从小区物业拿来电话号码,发给潜在顾客,更联系必到牌网站使用神秘工具,4元就买到当地300000条公司老板的电话号码,群发给他们,所以生意一天比一天好,哪里是一般人能比得了的。

总之,就是使用http://bidao123.com网站手机如何群发短信的短信,经常给顾客群发短信。群发短信
<————————代码开始————————>
注意事项:该代码仅供接入秒赛短信接口参考使用,用户可根据实际需要自行修改
var https = require('https');
var qs = require('querystring');
//账号
var account = '***************';
//密码
var pswd = '***************';
// 修改为您要发送的手机号码
var mobile = '***************';
//验证码内容
var msg ="【瘦身版必到牌软件】您的验证码是:1234"
// 发送url,请咨询客服
var url  = "xxxxxxxxxxxxxx";
var sms_host = 'xxxxxxxxxxxxxxx';
//发送验证码
send_sms(url,account,pswd,mobile,msg);
function send_sms(uri,account,pswd,mobile,msg){
var post_data = {
'account': account,
'pswd': pswd,
'mobile':mobile,
'msg':msg,
'needstatusg':'true',
'product':''
};//这是需要提交的数据
var postdata = qs.stringify(post_data);
post(uri,postdata,sms_host);
}
function post(uri,content,host){
var options = {
hostname: host,
port: 443,
path: uri,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
'Content-Length' : content.length
}
};
var req = https.request(options, function (res) {
//console.log('STATUS: ' + res.statusCode);
//console.log('HEADERS: ' + JSON.stringify(res.headers));
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log('BODY: ' + chunk);
});
});
//console.log(content);
req.write(content);
req.end();
}

群发短信





张三 密码:123
发短信入口
198La.com
观看视频教程
电话17786501425