asp程序调用短信接口源码
更多
作者:捷信通来源:www.jiexintong.cn日期:2014-07-31 17:59:31
现在很多启用还在使用asp程序,我们技术总结出了asp程序调用短信接口源码例子,请参考,如果有疑问,欢迎各位客户联系我们:企业QQ4000040203!
asp程序调用短信接口源码
Response.Charset = "gb2312"
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
dim accountname,accountpwd,mobilecodes,msgcontent
dim obj,Request_String,Return_String
'接收表单数据
accountname = request("accountname")
accountpwd = request("accountpwd")
mobilecodes = request("mobilecodes")
msgcontent = request("msgcontent")
'判断接收的参数是否为空
if len(accountname) > 0 and len(accountpwd) > 0 and len(mobilecodes) > 0 and len(msgcontent) > 0 then
'建立InetCtls.Inet.1组件对象
Set https = Server.CreateObject("MSXML2.ServerXMLHTTP")
With https
.Open "Post", "http://csdk.zzwhxx.com:8002/submitsms.aspx", False
.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
.Send "accountname=" & accountname & "&accountpwd=" & accountpwd & "&mobilecodes=" & mobilecodes & "&msgcontent=" & msgcontent
Return_String = .ResponseBody
End With
Return_String = BytesToBstr(Return_String,"GB2312")
Set https = Nothing
response.write "短信服务器返回值为:" & Return_String & ""
else
response.write "请输入完整的参数"
end if
%>
上面的asp程序调用短信接口短信源码只是一个例子,如果客户需要更加丰富的短信平台功能开发,请联系我们技术,此外我们团队也支持微信平台二次开发!
文章相关标签:短信接口,asp程序调用短信接口源码
相关文章如下:
关于asp程序调用短信接口源码评论如下:
评论加载中...
内容:
评论者:
验证码: