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
Function HTTPPost(sURL,sPara)
HTTPPost=""
Set objXML = CreateObject("MSXML2.ServerXMLHTTP.6.0")
objXML.setTimeouts 10000, 60000, 10000, 10000
objXML.open "POST", sURL, False
objXML.setRequestHeader "content-type", "application/x-www-form-urlencoded"
objXML.send(sPara)
'HTTPPost = objXML.responseText
HTTPPost = BytesToBstr(objXML.responseBody, "GB2312")
Set objXML = Nothing
End Function
Content=Server.URLEncode("您的注册验证码为8268,该验证码10分钟内有效。如非本人操作请忽略此短信!【浪驰软件】")
msURL ="http://域名/LANZGateway/DirectSendSMSs.asp"
mdata ="UserID=999999&Account=lanz2016&Password=735FF0028B7831D2783DD7EE98E3095DB94A1D64
&Content="&Content&"&Phones=11111111111&ReturnXJ=1"
response.write HTTPPost(msURL,mdata)
|
XML: <?xml version="1.0" encoding="GB2312"?> <LANZ_ROOT> <ErrorNum>0</ErrorNum> <JobID>2321313130</JobID> <PhonesSend>98</PhonesSend> <ErrPhones>13855556666;13611112222</ErrPhones> <DeductionSMSs>1000</DeductionSMSs> </LANZ_ROOT> JSON: { "LANZ_ROOT": { "ErrorNum": "0", "JobID": "2321313130", "PhonesSend": "98", "ErrPhones": "13855556666;13611112222", "DeductionSMSs": "1000" } }
|