云片短信平台ASP版程序网站使用方法



云片短信平台ASP版程序使用方法:
<%

@LANGUAGE="VBSCRIPT" CODEPAGE="65001"
response.contenttype = "text/html;charset=utf-8"
method = "POST"

mobile = Server.URLEncode("xxxxxxxxxxx") '您要发送的手机号

apikey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" '修改为您的apikey(https://www.yunpian.com)登录官网后获取

text ="【云片网】您的验证码是1234" '发送内容

url_send_sms   = "https://sms.yunpian.com/v2/sms/single_send.json"

data_send_sms  =  "apikey=" & apikey & "&mobile=" & mobile & "&text=" & text

response.write GetBody(url_send_sms,data_send_sms)

Function GetBody(url,data)
    Set https = Server.CreateObject("MSXML2.ServerXMLHTTP")
    With https
    .Open method, url, False
    .setRequestHeader "Content-Type","application/x-www-form-urlencoded"
    .Send data
   
    GetBody= .ResponseBody
    End With
    GetBody = bytetostr(https.ResponseBody,"utf-8")
    Set https = Nothing
End Function
function bytetostr(vin,cset)
dim bs,sr
set bs = server.createObject("adodb.stream")
    bs.type = 2
    bs.open
    bs.writetext vin
    bs.position = 0
    bs.charset = cset
    bs.position = 2
    sr = bs.readtext
    bs.close
set bs = nothing
bytetostr = sr
end function

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

XYCMS

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值