微信小程序> asp获取微信小程序二维码

asp获取微信小程序二维码

浏览量:2275 时间: 来源:码农18611436777

<%

Function RB_Post(url,data,imgpath)
Set XmlObj = Server.CreateObject(“Msxml2.XMLHTTP.6.0”)
XmlObj.open “POST”, url, False
XmlObj.SetRequestHeader “Accept”,"/"
XmlObj.SetRequestHeader “Accept-Language”,“zh-cn”
XmlObj.setRequestHeader "Content-Type ",“application/x-www-form-urlencoded”
XmlObj.SetRequestHeader “User-Agent”, Request.ServerVariables(“HTTP_USER_AGENT”)
XmlObj.SetRequestHeader “Content-Length”,Len(data)
XmlObj.setRequestHeader “Connection”,“Close”
XmlObj.setRequestHeader “Cache-Control”,“no-cache”
XmlObj.send(data)
Set st=server.CreateObject(“adodb.stream”)
st.type=1
st.mode=3
st.open
st.position=0
st.write XmlObj.ResponseBody
st.savetofile server.MapPath(imgpath),2
st.close
Set st=Nothing
RB_Post=imgpath
Set XmlObj = nothing
End Function

Dim url,data,ACCESS_TOKEN,testimg
ACCESS_TOKEN=“12_545454545454fdsafdsafsdafsdafds”
url = “https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=”&ACCESS_TOKEN
data="{"“path”":"“pages/index?query=1"”,"“width”":430}"
testimg = RB_Post(url,data,“333.png”)

response.Write testimg

%>

版权声明

即速应用倡导尊重与保护知识产权。如发现本站文章存在版权问题,烦请提供版权疑问、身份证明、版权证明、联系方式等发邮件至197452366@qq.com ,我们将及时处理。本站文章仅作分享交流用途,作者观点不等同于即速应用观点。用户与作者的任何交易与本站无关,请知悉。

  • 头条
  • 搜狐
  • 微博
  • 百家
  • 一点资讯
  • 知乎