mobile=request("mobile")
Randomize
yanzhengma=int(9000*rnd())+1000
'应客户要求,短信发送已经移动到后台审核模块
if mobile<>"" and len(mobile)=11 then
msgcontent="您好,您的注册验证码:"&yanzhengma
fSnedSM mobile,msgcontent
sql="select * from [Rn_mobile] where mobile='"&mobile&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if (rs.bof and rs.eof) then
rs.addnew
end if
rs("mobile")=mobile
rs("yanzhengma")=yanzhengma
rs("addtime")=now()
rs.update
rs.close
set rs=nothing
response.write"{""code"": ""0""}"
end if
function fSnedSM(Mobile,Content)
Dim HttpUrl,https,xml
If Mobile <> "" and Content <>"" then
HttpUrl = "http://******/WS/BatchSend2.aspx?CorpID=***&Pwd=***"
HttpUrl = HttpUrl &"&Mobile="&Mobile
HttpUrl = HttpUrl & "&Content="&Content
HttpUrl = HttpUrl & "&Cell=&SendTime="
Set https = Server.CreateObject("MSXML2.XMLHTTP")
https.open "post", HttpUrl, False
https.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
https.send
Set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = False
xml.setProperty "ServerHTTPRequest", True
xml.Load https.responseBody
fSnedSM=cstr(https.responseText)
End if