<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
|
<% Session.CodePage=65001 %>
|
<% Response.charset = "utf-8" %>
|
<%
|
appid=request("appid")
|
sessionKey=request("sessionKey")
|
encryptedData=request("encryptedData")
|
iv=request("iv")
|
|
url="https://api.966120.com.cn/weixin/encryptedData/index.php" '//定义要获取源代码的网址,一般是通过变量传递过来
|
Origin="appid="&appid
|
Origin=Origin&"&sessionKey="&Server.URLEncode(sessionKey)
|
Origin=Origin&"&encryptedData="&Server.URLEncode(encryptedData)
|
Origin=Origin&"&iv="&Server.URLEncode(iv)
|
'Response.Write url&"?"&Origin
|
'Response.End
|
'Origin=Origin&"&Encrypt="&
|
HTMLCODE= GetBody(url,Origin)
|
|
Response.Write HTMLCODE
|
|
'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
|
|
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
|
%>
|