国产成人精品三级麻豆 I koreanbj精品视频一区 I yy6080高清性理论片啪 I 18禁裸体动漫美女无遮挡网站 I 福利国产在线 I 成人在线a I 天天插伊人 I 91av在线不卡 I 午夜影视大全视频在线观看 I 日韩午夜精品 I 91干在线 I 久久尤物视频 I 青青草91在线视频 I 五月婷婷狠狠干 I 成人国产一区二区三区 I 两个男人操一个女人视频 I 久久三 I 久久国产精品99久久久大便 I 老司机亚洲精品影院无码 I 成人91在线 I 日本免费不卡一区在线电影 I 日本三级三级 I а天堂中文最新版在线 I 国产亚洲网站 I 高潮呻吟视频 I 国产精品久久自在自线不 I 天天干干天天 I 久久伊人导航 I 国产高清自拍视频 I 国产成人久久精品 I 可以免费看污视频的网站 I 免费看成人黄色 I 尤物视频在线观看视频 I 青椒成人免费视频 I av综合 日韩

您是否正受到短信簽名報備的困擾?達信通解決方案讓您最快15分鐘內恢復信息傳遞,馬上 注冊體驗

NODE.JS

NODE.JS代碼示例

/* *
 * 接口類型:達信通觸發(fā)短信接口,支持發(fā)送驗證碼短信、訂單通知短信等。
 * 賬戶注冊:請通過該地址開通賬戶http://sms.wx96.com/register.html
 * 注意事項:
*(1)調試期間,請用默認的模板進行測試,默認模板詳見接口文檔;
 *(2)請使用 用戶名 及 APIkey來調用接口,APIkey在會員中心可以獲取;
*(3)該代碼僅供接入達信通短信接口參考使用,客戶可根據實際需要自行編寫;
*/
 
/**
 * Created by XadillaX on 14-2-12.
 * https://github.com/XadillaX/wx96106js
*/ 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.wx96.com/webservice/sms.php?method=Submit";
var _userAgent = "node-wx96106-module by 死月 (admin@xcoder.in)";
/** * wx96 constructure.
* @param account * @param password 查看密碼請登錄用戶中心->驗證碼、通知短信->帳戶及簽名設置->APIKEY */ var wx96 = function(account, password) {
this.spidex = require("spidex"); this.spidex.setDefaultUserAgent(_userAgent); this.account = account; this.password = password; }; /** * send an SMS. * @param mobile * @param content * @param callback */ wx96.prototype.send = function(mobile, content, callback) { var data = { account : this.account, password : this.password, mobile : mobile, content : content }; this.spidex.post(_baseUri, function(html, status) { if(status !== 200) { callback(new Error("短信發(fā)送服務器響應失敗。")); return; } html = html.replaceAll("\r", ""); html = html.replaceAll("\n", ""); html = html.replaceAll(" xmlns=\"http://106.wx96.com/\"", "");
//console.log(html); var doc = new dom().parseFromString(html); var result = doc.lastChild; var json = {}; for(var node = result.firstChild; node !== null; node = node.nextSibling) { json[node.tagName] = node.firstChild.data; } //console.log(json); if(json.code == "2") { callback(null, json.smsid); } else { callback(new Error(json.msg, parseInt(json.code))); } }, data, "utf8").on("err", function(e) { callback(e); }); }; module.exports = wx96;
在線咨詢
電話咨詢

服務熱線:

4008 808 898

服務熱線(工作時間):

4008 808 898

業(yè)務咨詢(非工作時間):

4008 808 898

售后咨詢(非工作時間):

4008 808 898