国产片在线看-国产片自拍-国产片欧美片亚洲片久久综合-国产片性视频免费播放-91福利区-91福利在线观看视频

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

如果服務器不支持解析,

請聯系技術人員進行協助處理!

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

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

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

 

JAVA實例

公共類SmsClientSend { 
/ * 
* @param url 
*:必填 - 發送連接地址URL - http://dc.28inter.com/sms.aspx 
* @param userid 
*:必填 - 用戶ID,為數字
* @param account 
*:必填 - 用戶帳號
* @param密碼
*:必填 - 用戶密碼
* @param mobile 
*:必填 - 發送的手機號碼,多個可以用逗逗隔比如> 130xxxxxxxx ,131xxxxxxxx 
* @param content 
*:必填 - 實際發送內容,
* @param action 
*:選填 - 訪問的事件,默認為send 
* @param sendType 
*:選填 - 發送方式,默認為POST 
* @param codingType 
*:選填 - 發送內容編碼方式,默認為UTF-8 
* @param backEncodType 
*:選填 - 返回內容編碼方式,默認為UTF-8 
* @return返回發送之后收到的信息
* / 
private static String sendSms(String url,String userid,String account,
String password,String mobile,String content,String action,
String sendType,String codingType,String backEncodType){

try { 
if(codingType == null || codingType.equals("")){ 
codingType ="UTF-8"

如果(backEncodType == NULL || backEncodType.equals( "")){ 
backEncodType = "UTF-8"
StringBuffer send = new StringBuffer(); 
if(action!= null &&!action.equals( "")){ 
send.append("action =")。append(action); 
} else { 
send.append("action = send"); 
}

send.append( "&用戶id =")附加(用戶ID)。
send.append("&account =")。append(
URLEncoder.encode(account,codingType)); 
send.append("&password =")。append(
URLEncoder.encode(password,codingType)); 
send.append("mobile ="),append ;

send.append("&content ="),append ;

URLEncoder.encode(content,codingType)); 
if(sendType!= null &&(sendType.toLowerCase())。equals("get")){ 
return SmsClientAccessTool.getInstance()。doAccessHTTPGet(
url +“?”+ send.toString(),backEncodType); 
} else { 
return SmsClientAccessTool.getInstance()。doAccessHTTPPost(url,
send.toString(),backEncodType); 

}(例外){ 
e.printStackTrace(); 
return“未發送,編碼異常”

}


公共類SmsClientAccessTool {

private static SmsClientAccessTool smsClientToolInstance;

/ ** 
*采用單列方式來訪問操作

* @return 
* / 
public static synchronized SmsClientAccessTool getInstance(){

if(smsClientToolInstance == null){ 
smsClientToolInstance = new SmsClientAccessTool(); 

return smsClientToolInstance; 
}

/ ** 
*

* POST方法
*


* @param sendUrl 
*:訪問URL 
* @param paramStr 
*:參數串
* @param backEncodType 
*:返回的編碼
* @return 
* / 
public String doAccessHTTPPost(String sendUrl,String sendParam,
String backEncodType){

StringBuffer receive = new StringBuffer(); 
BufferedWriter wr = null; 
try { 
if(backEncodType == null || backEncodType.equals("")){ 
backEncodType ="UTF-8" 
}

URL url =新網址(sendUrl); 
HttpURLConnection URLConn =(HttpURLConnection)url 
.openConnection();

URLConn.setDoOutput(真); 
URLConn.setDoInput(真); 
((HttpURLConnection)URLConn)。setRequestMethod("POST"); 
URLConn.setUseCaches(假); 
URLConn.setAllowUserInteraction(真); 
HttpURLConnection.setFollowRedirects(真); 
URLConn.setInstanceFollowRedirects(真);

URLConn.setRequestProperty("Content-Type",
“application / x-www-form-urlencoded; charset = UTF-8); 
URLConn.setRequestProperty("Content-Length",String 
.valueOf(sendParam.getBytes()。length));

DataOutputStream dos = new DataOutputStream(URLConn 
.getOutputStream()); 
dos.writeBytes(sendParam);

BufferedReader rd = new BufferedReader(new InputStreamReader(
URLConn.getInputStream(),backEncodType)); 
字符串行; 
while((line = rd.readLine())!= null){ 
receive.append(line).append("\ r \ n"); 

rd.close(); 
} catch(java.io.IOException e){ 
receive.append("訪問產生了異常 - >").append(e.getMessage()); 
e.printStackTrace(); 
} finally { 
if(wr!= null){ 
try { 
wr.close(); 
} catch(IOException ex){ 
ex.printStackTrace(); 

WR = NULL; 

}

return receive.toString(); 
}

public String doAccessHTTPGet(String sendUrl,String backEncodType){

StringBuffer receive = new StringBuffer(); 
BufferedReader in = null; 
try { 
if(backEncodType == null || backEncodType.equals("")){ 
backEncodType ="UTF-8" 
}

URL url =新網址(sendUrl); 
HttpURLConnection URLConn =(HttpURLConnection)url 
.openConnection();

URLConn.setDoInput(真); 
URLConn.setDoOutput(真); 
URLConn.connect(); 
URLConn.getOutputStream()平齊(); 
in = new BufferedReader(new InputStreamReader(URLConn 
.getInputStream(),backEncodType));

字符串行; 
while((line = in.readLine())!= null){ 
receive.append(line).append("\ r \ n"); 
}

} catch(IOException e){ 
receive.append("訪問產生了異常 - >")。append(e.getMessage()); 
e.printStackTrace(); 
} finally { 
if(in!= null){ 
try { 
in.close(); 
} catch(java.io.IOException ex){ 
ex.printStackTrace(); 

in = null;


}

return receive.toString(); 

}

微信

公眾號

主站蜘蛛池模板: 亚洲天堂毛片 | 中文无线乱码二三四区 | 国产成人久视频免费 | 亚洲伦 | 亚洲美女综合网 | 亚洲精品日本高清中文字幕 | 久久99热只有视精品6国产 | 一级毛片在线视频 | 国产原创在线视频 | 午夜毛片不卡高清免费 | 亚洲区精品久久一区二区三区 | 国产一区二区三区四区五区tv | 国产成人毛片精品不卡在线 | 2022男人天堂 | 成人一级网站 | 免费国产a | 亚洲精品无码专区在线播放 | 国内9l视频自拍 | 久久精品一区二区三区不卡牛牛 | 在线观看视频一区二区三区 | 日韩欧美亚洲天堂 | 国产美女精品三级在线观看 | 视频二区国产 | 在线播放一区二区精品产 | 天天看有黄有色大片 | 日本aaa视频 | 国产视频高清在线观看 | 婷婷色综合久久五月亚洲 | 豆国产97在线 | 亚洲 | 一级精品视频 | 成人在线中文字幕 | 色久激情 | 精品国产免费观看一区 | 久草在线新视频 | 午夜免费福利网站 | 老司机精品影院一区二区三区 | 另类zoofilia杂交videos| 国产精品福利午夜h视频 | 午夜精品网 | 欧美成人免费高清网站 | 武松大战潘金莲三级在线 |