凹凸国产熟女精品视频app,japanesexxxx极品少妇,aaa片欧美,久久天天躁狠狠躁夜夜躁2017,www.777熟女人妻

請求地址
名稱是否必須示例值說明
請求地址UTF-8http://dc.28inter.com/sms.aspx

如果服務器不支持解析,

請聯(lián)系技術人員進行協(xié)助處理!

請求參數(shù)
名稱是否必須示例值描述
發(fā)送任務命令必須固定設置為:send設置為固定的:send
帳戶                必須28inter注冊獲或系統(tǒng)管理員分配取,登陸賬號
密碼    必須123456    注冊或系統(tǒng)管理員分配獲取,登陸密碼
用戶ID    必須1001   注冊或系統(tǒng)管理員分配獲取,賬戶ID
發(fā)送號碼必須13000000000,13000000001短信接收號碼。支持單個或多個手機號碼,傳入號碼為11位手機號碼,不能加0或86。群發(fā)短信需傳入多個號碼,以英文逗號分隔,一次調(diào)用最多傳入200個號碼示例:13000000000,13000000001
發(fā)送內(nèi)容必須【創(chuàng)信信息】您的驗證碼是:123456

發(fā)送短信的內(nèi)容,整體做用urlencode。短信的格式為:【簽名】放在內(nèi)容的最前方。
示范:【創(chuàng)信信息】您本次注冊的驗證碼是:888888,
其中簽名可根據(jù)自己公司的名稱或簡稱自定義,字數(shù)為2-8字,不可以是純數(shù)字,電話號碼或者網(wǎng)址,不可以是無意義的簽名,比如【大家好】;【哈哈哈】;【提示】;【測試】等
正確示例:【創(chuàng)信信息】,【京東】,【百度】,【工商銀行】
錯誤示例:【你好】,【通知】,【測試一下】,【哈哈哈】,【123123】

sendtime可選2000-12-31 00:00:10短信定時發(fā)送時間。不設置默認為立即發(fā)送。格式為:YYYY-MM-DD HH:MM:SS
rt可選json固定值 json,不填則為XML格式返回

 

NODE.JS實例

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://dc.28inter.com/sms.aspx?action=send"

var _userAgent = "node-cxsms"

/**

 * sms constructure.

 * @param userid ID

 * @param account 用戶名

 * @param password 接口密碼

 */

var sms = function(userid, account, password) {

    this.spidex = require("spidex");

    this.spidex.setDefaultUserAgent(_userAgent);  

    this.userid = userid;

    this.account = account;

    this.password = password;

}; 

/**

 * send an SMS.

 * @param mobile

 * @param content

 * @param callback

 */

sms.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://dc.28inter.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 = sms;

微信

公眾號