Writing a:
Copy Code code as follows:
<%
Sub sendsms (mobile,msg)
If you need to send multiple mobile phone number, please automatically cycle, multiple mobile phone number between "," separated, the last mobile phone number does not add, number
' or call our Httpinterfacemore.aspx interface, followed by parameters, or call our Webservers interface
Dim userid,password,username,sms,status
Dim Xmlobj,httpsendurl
' Please add your account password
Sms= "Platform"
Username= "User Name"
UserID = "Enterprise ID"
Password = "Password"
Please contact us to obtain a free test account
Httpsendurl= "Http://jiekou.56dxw.com/sms/HttpInterface.aspx?"
Comid= "&userid&" &username= "&username&" &userpwd= "&password&" &handtel= "& mobile& "
&sendcontent= "&server. UrlEncode (msg) & "&sendtime=&smsnumber=" &sms
Set xmlobj = server. CreateObject ("Microsoft.XMLHTTP")
Xmlobj.open "POST", Httpsendurl,false
Xmlobj.send ()
Status = Xmlobj.responsetext
Set xmlobj = Nothing
If status = "1" then sent successfully
Response.Write "<br><br> Return Status code:" &status& Send status: Send success! <a
Href= "" Javascript:history.back (); "" > Back to send Page </a> "
Else ' send failed
Response.Write "<br><br> Return Status code:" &status& Send status: Send failed! <a
Href= "" Javascript:history.back (); "" > Back to send Page </a> "
End If
End Sub
%>
Writing two
Copy Code code as follows:
<%
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
is sent successfully
If msg= "1" then
sendsms= "OK"
Else
sendsms= "ERR "
End IF
End Function
%>