您的位置:首页 >  接口中心 > 365bet官网网址是多少接口DEMO-ASP
  365bet官网网址是多少接口DEMO-ASP
 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!--#include file="md5.asp"-->

<%

response.codepage=65001  

response.charset="utf-8"  

url="https://xxx/sms-partner/access/{您的账号}/sendsms"

username="{您的账号}" ''请替换您的帐号

password=md5("您的密码") ''请替换您的密码


mobile="*******" ''要发送的手机号码,多个请用英文状态下的,逗号间隔

Randomize

code = Int(Rnd * 9000 + 1000)

content="【云信】您的验证码是"&code  ''要发送的内容



data="{""smstype"":""4"",""clientid"":""b05gv1"",""password"":""8a6f2805b4515ac12058e79e66539be1"",""mobile"":"""&mobile&""",""content"":"""&content&""",""sendtime"":"""&now&""",""extend"":""00"",""uid"":""00""}"

set http=Server.createobject("Microsoft.XMLHTTP") 

    Http.open "POST",url,false 

    http.setRequestHeader "Accept-Encoding","identity "

    http.setRequestHeader "Accept","application/json"

    http.setRequestHeader "Content-Length",len(data)

    http.setRequestHeader "Content-Type","application/json; charset=utf-8"

    Http.send(data)

    '获得返回结果

    response.write http.responseText

    'code===0 表示发送成功请自行解析json数据 或返回前台用js解析json数据