可以应用到马克斯电影站生成Rss Feed的代码(2)
get_left_i=0
Do while not rs1.eof
get_left_i=get_left_i+1
get_left=get_left&" <item>"&Chr(13)
get_left=get_left&" <title>"&re(rs1("zt_name"))&"</title>"&Chr(13)
get_left=get_left&" <link>http://"&maxz_2&"/"&get_classenname(rs1("zt_type"))&"/"&rs1("zt_id")&"</link>"&Chr(13)
get_left=get_left&" <description><![CDATA[<p>类别:<a href=""http://"&maxz_2&"/"&get_classenname(rs1("zt_type"))&""">"&get_classname(rs1("zt_type"))&"</a></p><p>主演:"&rs1("zt_zy")&"</p><p>剧情:"&re(rs1("zt_content"))&"</p>]]></description>"&Chr(13)
get_left=get_left&" <guid>http://"&maxz_2&"/"&get_classenname(rs1("zt_type"))&"/"&rs1("zt_id")&"</guid>"&Chr(13)
get_left=get_left&" <category><![CDATA["&get_classname(rs1("zt_type"))&"]]></category>"&Chr(13)
get_left=get_left&" <pubDate>"&DateToRFC822(rs1("zt_date"))&"</pubDate>"&Chr(13)
get_left=get_left&" </item>"&Chr(13)
If get_left_i>=n Then Exit Do
rs1.movenext
Loop
rs1.close
End Function
Function DateToRFC822(byVal dtaVal)
Dim strCurLocale : strCurLocale = GetLocale()
SetLocale("en-gb")
dtaVal = CDate(dtaVal)
DateToRFC822 = WeekdayName(Weekday(dtaVal),True)&", "& _
Right("0"&Day(dtaVal),2)&" "& _
MonthName(Month(dtaVal),True)&" "& _
Year(dtaVal)&" "& _
Right("0"&Hour(dtaVal),2)&":"& _
Right("0"&Minute(dtaVal),2)&":"& _
Right("0"&Second(dtaVal),2)&" "& _
Www~Chinaz~com
"+0800"
SetLocale(strCurLocale)
End Function
%></rss>