NODE.JS怎么给手机发短信

编程学习过程中,分享了一篇关于如何使用Node.js进行短信验证码接口对接的简易DEMO,包括账户注册步骤和调试注意事项,强调了在调试时应遵循的安全措施。
摘要由CSDN通过智能技术生成

学习编程得第N天,发现一个超简单验证码短信接口对接DEMO示例

​
* Created by XadillaX on 14-2-12.

*https://github.com/XadillaX/ihuyi106js

*/

String.prototype.replaceAll = function(reallyDo, replaceWith, ignoreCase) {

if (!RegExp.prototype.isPrototypeOf(reallyDo)) {

return this.replace(new RegExp(reallyDo, (ignoreCase ? "gi": "g")), replaceWith);

} else {

return this.replace(reallyDo, replaceWith);

}

};

var dom = require('xmldom').DOMParser;

var _baseUri = "http://106.ihuyi.com/webservice/sms.php?method=Submit";

var _userAgent = "node-ihuyi106-module by 死月 (admin@xcoder.in)";

/**

* iHuyi constructure.

* @param account

* @param password 查看密码请登录用户中心->验证码、通知短信->帐户及签名设置->APIKEY

*/

var iHuyi = function(account, password) {

this.spidex = require("spidex");

this.spidex.setDefaultUserAgent(_userAgent);

this.account = account;

this.password = password;

};

/**

* send an SM
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值