wlzboy
2025-08-07 54979feba74bd3c7dea2630e1ba96401b25f60d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<%
'接口信息
APPID="GDS-0008-fDwr"
APPKey="TH8o9RQItfd9bzffeOCW"
 
'Get方法
Function GetBody(appUrl,Origin)
Set https = Server.CreateObject("Msxml2.ServerXMLHTTP") 
 
With https 
.Open "GET", appUrl&"?"&Origin, False
.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
.Send ""
GetBody = .ResponseBody
End With 
GetBody = BytesToBstr(GetBody,"utf-8")
Set https = Nothing 
End Function
 
'Post方法
Function PostBody(appUrl,args1)
    Set PBrs = Server.CreateObject("ADODB.Recordset")
    Set https = Server.CreateObject("Msxml2.ServerXMLHTTP") 
    
    'Set https = Server.CreateObject("MSXML2.XMLHTTP") 
    With https 
    .Open "Post", appUrl, False
    .setRequestHeader "Content-Type","multipart/form-data"
    .Send args1
    PostBody = .ResponseBody
    End With 
    PostBody = BytesToBstr(PostBody,"utf-8")
    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
 
%>