写法一:
[url=]Else '发送失败
Response.Write "<br><br>返回状态码:"&status&" 发送状态:发送失败! <a
href=""javascript:history.back();"">返回发送页面</a>"
End if
End sub
%>
写法二
<%
Function SendSms(UserName, UserPass, DstMobile, SmsMsg)
Dim http,msg,strUrl,RndNumber
set http = Server.CreateObject("Microsoft.XMLHTTP")
strurl="http://jiekou.56dxw.com/sms/HttpInterface.aspx?comid=121&username="&SmsName&"&userpwd="&SmsPw&"
&sendtime=&smsnumber=1065&handtel="&DstMobile&"&sendcontent="&server.URLEncode(SmsMsg)
http.Open "GET",strUrl, false
http.setRequestHeader "Content-type:", "text/xml;charset=GB2312"
http.Send
msg=http.ResponseText
set http = nothing
'代表发送成功
If msg="1" then
SendSms="OK"
else
sendSms="ERR"
end IF
End Function
%>