ASP

短信验证码

sendSmspost.asp

<%
Response.Charset="GBK"
username="******" ''请替换您的帐号
password="******" ''请替换您的密码
ttgshouji="18624251010" ''要发送的手机号码,多个请用英文状态下的,好间隔
ttgnr="【云信互联】您好,您订购的货物到了11111111111111111111111"'' 要发送的内容
url="http://sms.smsyun.cc:9012/servlet/UserServiceAPI"
data="method=sendSMS&username="&username&"&password="&password&"&smstype=1&content="&Server.URLEncode(ttgnr)&"&mobile="&ttgshouji&""
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "POST",url,false
http.setRequestHeader "Content-Length",len(data)
http.setRequestHeader "Content-Type","application/x-www-form-urlencoded; "
Http.send(data)
'获得返回结果
response.write http.responseText
'对返回结果处理,如果返回结果为success表示成功,,返回failure;错误提示表示调用失败
%>

sendSmsget.asp

<%
Response.Charset="GBK"
username="******" ''请替换您的帐号
password="******" ''请替换您的密码
ttgshouji="18624251010" ''要发送的手机号码,多个请用英文状态下的,好间隔
ttgnr="【云信互联】您好,您订购的货物到了1111111122211111111111"'' 要发送的内容
url="http://sms.smsyun.cc:9012/servlet/UserServiceAPI?method=sendSMS&username="&username&"&password="&password&"&smstype=1&content="&Server.URLEncode(ttgnr)&"&mobile="&ttgshouji&""
''response.Write(url)
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
http.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
Http.send
'获得返回结果
response.write http.responseText
'对返回结果处理,如果返回结果为success表示成功,,返回failure;错误提示表示调用失败
%>