<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include virtual="/inc/odbc.asp"-->
|
|
<!docType html>
|
<html>
|
<head>
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
|
<title>微信获取成功发布列表</title>
|
<!--#include virtual="/inc/JsonPost.asp"-->
|
</head>
|
<body>
|
<center>
|
|
<%'Response.end
|
'微信临时二维码请求
|
|
for offset=0 to 1
|
appUrl="https://api.weixin.qq.com/cgi-bin/freepublish/batchget?access_token="&access_token
|
|
args1="{"
|
args1=args1&"""offset"":"&offset*20&","
|
args1=args1&"""count"":20"
|
args1=args1&"}"
|
|
'Response.Write appUrl&"<br>"&args1 &"<br><br><br>"
|
'Response.end
|
HTMLCODE= PostBody(appUrl,args1)
|
'Response.Write HTMLCODE &"<br><br>"
|
json=HTMLCODE
|
%>
|
<script language="jscript" runat="server">
|
Array.prototype.get = function(i)
|
{
|
return this[i];
|
};
|
function getjson(str){
|
try{
|
eval("var jsonStr = (" + str + ")");
|
}catch(ex){
|
var jsonStr = null;
|
}
|
return jsonStr;
|
}
|
</script>
|
<%
|
str=json
|
str=right(str,len(str)-instr(str,"?{")+1)
|
str=left(str,InstrRev(str,"}"))
|
dim obj
|
set obj = getjson(str)
|
str0=""
|
If obj.item.get(0)="[object Object]" Then
|
for j=0 to obj.item.length-1
|
article_id = obj.item.get(j).article_id ' 日期
|
title = obj.item.get(j).content.news_item.get(0).title '标题
|
'title = obj.item.get(j).url '图片连接
|
Response.Write (j+1)+(offset*20)&"<br>"&"article_id:"&article_id &"<br>"&title&"<br><br>"
|
Next
|
End If
|
|
Next
|
|
|
%>
|
</body>
|
</html>
|