28,391
社区成员
发帖
与我相关
我的任务
分享
Function GetBody(url,data) '飘易-获取远程IP地址POST信息
Set https = Server.CreateObject("MSXML2.XMLHTTP")
With https
.Open "Post", url, False
.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
.Send data
GetBody = https.ResponseBody
End With
GetBody = BytesToBstr(GetBody,"GB2312")
Set https = Nothing
End Function
Function BytesToBstr(body,Cset) '飘易:转换GB2312
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
responseXMltop= GetBody("https://gw.open.1688.com/openapi/http/1/system.oauth2/getToken/"&appKey, "code="&code&"&client_id="&appKey&"&redirect_uri="&redirect_uri&"&client_secret="&secretCode&"&grant_type=authorization_code&need_refresh_token=true")
response.Write(responseXMltop)