<
%@language="
vbscript
"codepage="
65001"%
>
<
%response.charset="
utf-8
"session.codepage
=65001
dimdb,conn,rs
setconn
=server.createobject(
"adodb.connection")
db="db1.mdb
"conn.open
"provider=microsoft.jet.oledb.4.0;data source="&
''//轉換時間為gmt(rfc822)格式
function
datetimetogmt(sdate)
dimdweek,dmonth
dimstrzero,strzone
strzero="
00"strzone="
+0800
"dweek
=array("
sun","
mon","
tue","
wes","
thu","
fri","
sat"
)dmonth
=array("
jan","
feb","
mar","
apr","
may","
jun","
jul","
aug","
sep","
oct","
nov","
dec"
)datetimetogmt
=dweek(
weekday
(sdate)-1
)&",
"&right
(strzero
&day
(sdate),2)
&""&
dmonth(
month
(sdate)-1
)&""
&year
(sdate)&"
"&right
(strzero
&hour
(sdate),2)
&":"
&right
(strzero
&minute
(sdate),2)
&":"
&right
(strzero
&second
(sdate),2)
&""&
strzone
end function
'//擷取標題長度
public
function
cut(str, strlen)
diml, t, c, il =
len(str)t =
0fori =
1tolc
=ascw(
mid(str, i, 1))
ifc
<0or
c >
255thent =
t +2elset =
t +1if
t >=
strlen
then
cut
=left
(str, i) &"
..."
exit
forelse
cut
=str
endif
next
end function
%>
<
%dim
srsshead,srssbody,srssend,ssql
response.contenttype ="
text/xml
"srsshead ="
"&vbnewline
srsshead
=srsshead &"
"&vbnewline
'頻道(channel)名稱
srsshead
=srsshead &"
rss頻道標題
"&vbnewline
'頻道所用語言
srsshead
=srsshead &"
zh-cn
"&vbnewline
'響應該頻道的**的url
'與頻道一起顯示的位址
srsshead
=srsshead &"
"&vbnewline
'是gif、jpeg或png影象檔案的url位址,該影象代表整個頻道
srsshead
=srsshead &"
/xrssfile/2007-12/8/2007128112855344.png
"&vbnewline
'響應該頻道的**的url
'頻道(channel)名稱
srsshead
=srsshead &"
rss頻道標題
"&vbnewline'結束
srsshead
=srsshead &"
"&vbnewline
'內容的發布時間
srsshead
=srsshead &"
"&datetimetogmt(
now())&"
"&vbnewline
'指向rss格式文件的url位址?
'技術人員的email
srsshead
=srsshead &"
"&vbnewline
'關於該頻道的描述
srsshead
=srsshead &"
頻道描述
"&vbnewline
'生成該頻道的程式的名稱
srsshead
=srsshead &"
rss generator by 網路大本營
"&vbnewline
ssql ="
select top 10 id,title,content,time,url from [article] order by id desc
"setrs=
conn.execute(ssql)
dowhile
notrs.eof
srssbody
=srssbody &"
"&vbnewline
'item(節點)的標題
srssbody
=srssbody &"
"&rs("
title")
&"]]>
"&vbnewline
'item(節點)的概要
srssbody
=srssbody &"
"&cut(rs(
"content"),
150)&"
]]>
"&vbnewline
'item(節點)的url
srssbody
=srssbody &"
"&rs("
url")&
" "
&vbnewline
'item(節點)作者的email
srssbody
=srssbody &"
"&vbnewline
'內容的發布時間
srssbody
=srssbody &"
"&rs("
time")
&""&
vbnewline
'item(節點)結束
srssbody
=srssbody &"
"rs.movenext
loop
rs.close
setrs
=nothing
srssend ="
"response.write(srsshead)
response.write(srssbody)
response.write(srssend)
conn.close
setconn
=nothing%
Rome自動生成Rss
channeleitem類,具體 author jackzhang public class channeleitem extends channelitem public void setenclosure string enclosure public void testbuildobject ...
使用Django生成RSS
感謝django強大的syndication feed framework,我可以很輕鬆地實現rss的生成工作。fallever的rss可以從每個blog的右下角找到。django的官方文件見這裡。文件中的第乙個example並不適合我,fallever現在的情況是提供每個blogger乙個rss檔...
RSS生成工具 服務推薦
時至2022,關於碎片化閱讀 資訊焦慮的討論仍在繼續且似乎並沒有形成廣泛共識的解決辦法。而研究生期間主要研究方向就是推薦系統且未來也大概率從事相關崗位的我,對以演算法為中心的資訊獲取方式可以說是又愛又恨。一方面,我認為必須正視推薦演算法在資訊 時代的作用。另一方面我也對推薦演算法帶來的資訊繭房等問題...