API接口
状态报告查询接口,代码示例,乐信
代码示例
状态报告查询接口代码示例
ASP
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'请将文件另存为UT-8
dim AccountID,MsgId,MobilePhone,ReportResultInfo,ReportState,ReportTime,SendResultInfo,SendState,SendedTime,SPNumber
dim temp 
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
AccountID=Request("AccountID")
MsgId=Request("MsgID")
MobilePhone=Request("MobilePhone")
ReportResultInfo=Request("ReportResultInfo")
ReportState=Request("ReportState")
ReportTime=Request("ReportTime")
SendResultInfo=Request("SendResultInfo")
SendState=Request("SendState")
SendedTime=Request("SendedTime")
SPNumber=Request("SPNumber")
temp=AccountID+" "+MsgID+" "+MobilePhone+" "+ReportResultInfo+" "+ReportState+" "+ReportTime+" "+SendResultInfo+" "+SendState+" "+SendedTime+" "+SPNumber
'您的业务逻辑
'........
'下面演示的是记录文件的DEMO
WriteData(temp)
Response.Write("OK"+temp)
Response.End
Sub WriteData(Desc)
  On Error Resume Next
  Dim oFs,OutFile
  set oFs = server.CreateObject("Scripting.FileSystemObject")
  set OutFile = oFs.OpenTextFile("C:\inetpub\wwwroot\upData.txt", 8, true)
  call OutFile.writeLine(Desc)
  OutFile.close 
end Sub
%>
                
JAVA
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="java.io.*"%>
<%@ page import="java.io.FileNotFoundException"%>
<%@ page import="java.io.FileOutputStream"%>
<%@ page import="java.io.IOException"%>
<%@ page import="java.io.OutputStreamWriter"%>
<%@ page import="java.io.UnsupportedEncodingException"%>
<%
            String AccountID = request.getParameter("AccountID");
      String MsgID = request.getParameter("MsgID");
            String MobilePhone = request.getParameter("MobilePhone");
            String ReportResultInfo = request.getParameter("ReportResultInfo");
      String ReportState = request.getParameter("ReportState");
      String ReportTime = request.getParameter("ReportTime");
      String SendResultInfo = request.getParameter("SendResultInfo");
      String SendState = request.getParameter("SendState");
      String SendedTime = request.getParameter("SendedTime");
      String SPNumber = request.getParameter("SPNumber");
            //您的业务逻辑
            //.......
            //demo
            //记LOG的例子,主要是为了upMsg编码的处理
            //请保存该文件的时候 编码方式:utf-8 和pageEncoding="utf-8"
            String upTotalMsg ="AccountID=" + AccountID+ "&MsgID=" + MsgID + "&MobilePhone=" + MobilePhone + "&ReportResultInfo=" + ReportResultInfo +  "&ReportState=" + ReportState + "&ReportTime=" + ReportTime + "&SendResultInfo=" + SendResultInfo + "&SendState=" + SendState + "&SendedTime=" + SendedTime + "&SPNumber=" + SPNumber;
            try {
                OutputStreamWriter osw = new OutputStreamWriter(
                        new FileOutputStream("D:/javalog.txt"), "UTF-8");
                osw.write(upTotalMsg);
                osw.flush();
                osw.close();
            } catch (IOException e) {
                out.println(e.getMessage());
            }
%>
<%="ok"%>
            
Asp.Net
string AccountID = Request["AccountID"] ?? string.Empty;
string MsgID = Request["MsgID"] ?? string.Empty;
string MobilePhone = Request["MobilePhone"] ?? string.Empty;
string ReportResultInfo = Request["ReportResultInfo"] ?? string.Empty;
string ReportState= Request["ReportState"] ?? string.Empty;
string ReportTime = Request["ReportTime"] ?? string.Empty;
string SendResultInfo = Request["SendResultInfo"] ?? string.Empty;
string SendState = Request["SendState"] ?? string.Empty;
string SendedTime = Request["SendedTime"] ?? string.Empty;
string SPNumber = Request["SPNumber"] ?? string.Empty;
string result = string.Format("AccountID ={0}|MsgID ={1}|MobilePhone={2}|ReportResultInfo={3}|ReportState ={4}|ReportTime ={5}|SendResultInfo={6}|SendState={7}|SendedTime={8}|SPNumber={9}", AccountID, MsgID, MobilePhone, ReportResultInfo,ReportState,ReportTime,SendResultInfo,SendState,SendedTime,SPNumber);
Response.Write(result);
                
PHP
<?php
$AccountID = $_REQUEST['AccountID'];
$MsgID = $_REQUEST['MsgID'];
$MobilePhone = $_REQUEST['MobilePhone'];
$ReportResultInfo = $_REQUEST['ReportResultInfo'];
$ReportState = $_REQUEST['ReportState'];
$ReportTime = $_REQUEST['ReportTime'];
$SendResultInfo = $_REQUEST['SendResultInfo'];
$SendState = $_REQUEST['SendState'];
$SendedTime = $_REQUEST['SendedTime'];
$SPNumber = $_REQUEST['SPNumber'];
//您的业务逻辑
//.......
//demo
//记LOG的例子,主要是为了$up_msg编码的处理
//请保存该文件的时候 编码方式:utf-8
$old_log = '';
if(file_exists("php-utf8-debug.log")){
  $old_log = file_get_contents("php-utf8-debug.log");
}
$up_msg = "AccountID=".$AccountID."&MsgID=".$MsgID."&MobilePhone=".$MobilePhone."&ReportResultInfo=".$ReportResultInfo."&ReportState=".$ReportState."&ReportTime=".$ReportTime."&SendResultInfo=".$SendResultInfo."&SendedTime"=.$SendedTime."&SendState=".$SendState."&SPNumber=".$SPNumber."\r\n";
$new_log = $old_log.$up_msg;
file_put_contents("php-utf8-debug.log",$new_log);
echo 'ok';
?>
                
产品
验证码短信
语音验证码
智能短信
国际短信
物联网解决方案
公司
关于我们
行业资讯
企业动态
荣誉资质
联系我们
帮助文档
API接口
下载
帮助
隐私条款
常见问题
合作伙伴
中国联通
中国移动
中国电信
联系我们
+86 400-969-6663
7*24小时全天候服务
support@lmobile.cn

乐信平台 短信验证码平台 中山网站建设 餐饮软件 手机归属地查询 广东数据中心 北京群发短信软件 郑州做网站公司 微信分销系统 样本印刷 雨林木风 WIFI设置 济南网站制作 深圳网站建设 win10系统下载 笔记本系统 制沙机 经典语录 追溯系统 防火窗 色差仪