{"id":339,"date":"2009-01-08T09:52:08","date_gmt":"2009-01-08T01:52:08","guid":{"rendered":""},"modified":"2014-02-27T23:06:05","modified_gmt":"2014-02-27T15:06:05","slug":"asp-rss%e8%ae%a2%e9%98%85%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2009\/01\/08\/339.htm","title":{"rendered":"asp-rss\u8ba2\u9605\u4ee3\u7801"},"content":{"rendered":"<p>\u5982\u4eca\u8d8a\u6765\u8d8a\u591a\u7684\u4eba\u5f00\u59cb\u5199\u8d77\u4e86\u535a\u5ba2\uff0c\u535a\u5ba2\u5e94\u8be5\u662f\u4e2a\u6027\u5f20\u626c\u7684\uff0c\u5e94\u8be5\u53cd\u5e94\u535a\u5ba2\u4e3b\u4eba\u5bf9\u751f\u6d3b\u7684\u67d0\u79cd\u8ba4\u77e5\uff0c\u8981\u4ee5\u539f\u521b\u7684\u5185\u5bb9\u4e3a\u4e3b\u3002\u53ea\u6709\u5199\u51fa\u4e86\u4e2a\u6027\uff0c\u5199\u51fa\u6709\u4ef7\u503c\u7684\u5185\u5bb9\u7684\u535a\u5ba2\u624d\u662f\u53ef\u770b\u7684\u535a\u5ba2\u3002\u5728\u53d1\u8868\u4e86\u4e00\u7bc7\u6587\u7ae0\u540e\uff0c\u5982\u4f55\u8ba9\u522b\u4eba\u7b2c\u4e00\u65f6\u95f4\u77e5\u9053\u5462\uff1fRSS\u8ba2\u9605\u529f\u80fd\u5c31\u53ef\u4ee5\u5b9e\u73b0\u4e86\u3002<\/p>\n<p>\n&nbsp;&nbsp;&nbsp;&nbsp; \u6bd4\u5982\u56fd\u5185\u77e5\u540d\u7684\u535a\u5ba2\uff0c\u65b0\u6d6a\u535a\u5ba2\u3001\u641c\u72d0\u535a\u5ba2\u3001\u7f51\u6613\u535a\u5ba2\u3001BLOGBUS\u3001MSN\u3001WordPress\u7b49\u535a\u5ba2\u7cfb\u7edf\u5747\u6709RSS\u8ba2\u9605\u529f\u80fd\u3002RSS\u8ba2\u9605\u662f\u6784\u6210\u826f\u597d\u7684\u535a\u5ba2\u3001\u7528\u6237\u4e92\u52a8\u7684\u4e00\u4e2a\u4f53\u73b0\u3002\u8fd9\u4e9b\u535a\u5ba2\u81ea\u8eab\u90fd\u5e26\u6709RSS\u8ba2\u9605\u529f\u80fd\uff0c\u53ea\u8981\u5728\u540e\u53f0\u7b80\u5355\u7684\u8bbe\u7f6e\u4e00\u4e0b\u5c31\u53ef\u4ee5\u8ba9\u7528\u6237\u8ba2\u9605RSS\u5185\u5bb9\u4e86\u3002<\/p>\n<p>\u867d\u7136\u8bf4\uff0c\u54b1\u7684\u535a\u5ba2\u521a\u5f00\u5f20\u6ca1\u591a\u4e45\uff0c\u4e5f\u4e0d\u786e\u5b9a\u6709\u591a\u5c11\u4eba\u4f1a\u8ba2\u9605\u672c\u535a\u5ba2\uff0c\u4f46\u6211\u76f8\u4fe1\uff0c\u53ea\u8981\u662f\u7528\u5fc3\u5199\u7684\u535a\u5ba2\uff0c\u5c31\u4f1a\u6709\u7528\u6237\u6765\u8ba2\u9605\u4f60\u7684\u535a\u5ba2\u3002<\/p>\n<p>&nbsp;\u6240\u4ee5\u6211\u4fbf\u5f00\u59cb\u4e3a\u6211\u7684\u535a\u5ba2\u589e\u52a0RSS\u8ba2\u9605\u529f\u80fd\uff0c\u6f14\u793a\u5730\u5740\u4e3a\uff1a<a rel=\"nofollow\" href=\"http:\/\/www.3zha.com\/love\/rss.asp\">http:\/\/www.3zha.com\/love\/rss.asp<\/a>\uff0cASP\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p>\u4ee5\u4e0b\u662f\u5f15\u7528\u7247\u6bb5\uff1a<\/p>\n<p>&lt;!&#8211;#Include File=&quot;conn.asp&quot;&#8211;&gt; <br \/>\n&lt;% <br \/>\nResponse.Charset = &quot;gb2312&quot; <br \/>\nResponse.ContentType=&quot;text\/xml&quot;&nbsp; <br \/>\nDim sql <br \/>\n&nbsp;&nbsp;&nbsp; sql = &quot;Select Top 20 From [\u8868\u540d] Order By date desc,id Desc&quot; <br \/>\nSet rs = conn.Execute(sql) <br \/>\nResponse.Write(&quot;&lt;?xml version=&quot;&quot;1.0&quot;&quot; encoding=&quot;&quot;gb2312&quot;&quot; ?&gt;&quot;) <br \/>\nResponse.Write(&quot;&lt;rss version=&quot;&quot;2.0&quot;&quot;&gt;&quot;) <br \/>\nResponse.Write(&quot;&lt;channel&gt;&quot;) <br \/>\nResponse.Write(&quot;&lt;title&gt;\u5317\u4eac\u5f39\u6307\u79d1\u6280\u7f51\u7edc\u5de5\u4f5c\u5ba4-\u63d0\u4f9b\u7f51\u7ad9\u5efa\u8bbe\u670d\u52a1\uff0c\u5e73\u9762\u8bbe\u8ba1&lt;\/title&gt;&quot;) <br \/>\nResponse.Write(&quot;&lt;link&gt;http:\/\/www.3zha.com&lt;\/link&gt;&quot;) <br \/>\nResponse.Write(&quot;&lt;description&gt;\u5f39\u6307\u79d1\u6280&lt;\/description&gt;&quot;) <br \/>\nDo While (rs.Eof = False) <br \/>\n&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;item&gt;&quot;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;title&gt;&lt;![CDATA[&quot;&amp;rs(&quot;c_title&quot;)&amp;&quot;]]&gt;&lt;\/title&gt;&quot;) <br \/>\n&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;link&gt;&lt;![CDATA[http:\/\/www.3zha.com\/news\/&quot;&amp;rs(&quot;url&quot;)&amp;&quot;.htm]]&gt;&lt;\/link&gt;&quot;) <br \/>\n&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;description&gt;&lt;![CDATA[&quot;&amp;left(rs(&quot;content&quot;),150)&amp;&quot;]]&gt;&lt;\/description&gt;&quot;) <br \/>\n&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;author&gt;&lt;![CDATA[&quot;&amp;rs(&quot;ator&quot;)&amp;&quot;]]&gt;&lt;\/author&gt;&quot;) <br \/>\n&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;category&gt;&lt;![CDATA[&quot;&amp;rs(&quot;class&quot;)&amp;&quot;]]&gt;&lt;\/category&gt;&quot;) <br \/>\n&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;pubDate&gt;&quot; &amp; return_RFC822_Date(rs(&quot;c_date&quot;),&quot;GMT&quot;) &amp; &quot;&lt;\/pubDate&gt;&quot;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>\n&nbsp;&nbsp;&nbsp; Response.Write(&quot;&lt;\/item&gt;&quot;) <br \/>\n&nbsp;&nbsp;&nbsp; rs.MoveNext() <br \/>\nLoop <br \/>\nResponse.Write(&quot;&lt;\/channel&gt;&quot;) <br \/>\nResponse.Write(&quot;&lt;\/rss&gt;&quot;) <br \/>\nFunction return_RFC822_Date(byVal myDate, byVal TimeZone)&nbsp;&nbsp;&nbsp; <br \/>\nDim myDay, myDays, myMonth, myYear&nbsp;&nbsp;&nbsp; <br \/>\nDim myHours, myMinutes, mySeconds&nbsp;&nbsp;&nbsp; <br \/>\nmyDate = CDate(myDate)&nbsp;&nbsp;&nbsp; <br \/>\nmyDay = EnWeekDayName(myDate)&nbsp;&nbsp;&nbsp; <br \/>\nmyDays = Right(&quot;00&quot; &amp; Day(myDate),2)&nbsp;&nbsp;&nbsp; <br \/>\nmyMonth = EnMonthName(myDate)&nbsp;&nbsp;&nbsp; <br \/>\nmyYear = Year(myDate)&nbsp;&nbsp;&nbsp; <br \/>\nmyHours = Right(&quot;00&quot; &amp; Hour(myDate),2)&nbsp;&nbsp;&nbsp; <br \/>\nmyMinutes = Right(&quot;00&quot; &amp; Minute(myDate),2)&nbsp;&nbsp;&nbsp; <br \/>\nmySeconds = Right(&quot;00&quot; &amp; Second(myDate),2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>\nreturn_RFC822_Date = myDay&amp;&quot;, &quot;&amp; _&nbsp;&nbsp;&nbsp; <br \/>\nmyDays&amp;&quot; &quot;&amp; _&nbsp;&nbsp;&nbsp; <br \/>\nmyMonth&amp;&quot; &quot;&amp; _&nbsp;&nbsp;&nbsp;&nbsp; <br \/>\nmyYear&amp;&quot; &quot;&amp; _&nbsp;&nbsp;&nbsp; <br \/>\nmyHours&amp;&quot;:&quot;&amp; _&nbsp;&nbsp;&nbsp; <br \/>\nmyMinutes&amp;&quot;:&quot;&amp; _&nbsp;&nbsp;&nbsp; <br \/>\nmySeconds&amp;&quot; &quot;&amp; _&nbsp;&nbsp;&nbsp;&nbsp; <br \/>\n&quot; &quot; &amp; TimeZone&nbsp;&nbsp;&nbsp; <br \/>\nEnd Function&nbsp; <br \/>\n&rsquo;&rsquo;\u661f\u671f\u8f6c\u6362\u51fd\u6570 <br \/>\nFunction EnWeekDayName(InputDate)&nbsp;&nbsp;&nbsp; <br \/>\nDim Result&nbsp;&nbsp;&nbsp; <br \/>\nSelect Case WeekDay(InputDate,1)&nbsp;&nbsp;&nbsp; <br \/>\nCase 1:Result=&quot;Sun&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 2:Result=&quot;Mon&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 3:Result=&quot;Tue&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 4:Result=&quot;Wed&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 5:Result=&quot;Thu&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 6:Result=&quot;Fri&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 7:Result=&quot;Sat&quot;&nbsp;&nbsp;&nbsp; <br \/>\nEnd Select&nbsp;&nbsp;&nbsp; <br \/>\nEnWeekDayName = Result&nbsp;&nbsp;&nbsp; <br \/>\nEnd Function&nbsp; <br \/>\n&rsquo;&rsquo;\u6708\u4efd\u8f6c\u6362\u51fd\u6570 <br \/>\nFunction EnMonthName(InputDate)&nbsp;&nbsp;&nbsp; <br \/>\nDim Result&nbsp;&nbsp;&nbsp; <br \/>\nSelect Case Month(InputDate)&nbsp;&nbsp;&nbsp; <br \/>\nCase 1:Result=&quot;Jan&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 2:Result=&quot;Feb&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 3:Result=&quot;Mar&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 4:Result=&quot;Apr&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 5:Result=&quot;May&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 6:Result=&quot;Jun&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 7:Result=&quot;Jul&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 8:Result=&quot;Aug&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 9:Result=&quot;Sep&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 10:Result=&quot;Oct&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 11:Result=&quot;Nov&quot;&nbsp;&nbsp;&nbsp; <br \/>\nCase 12:Result=&quot;Dec&quot;&nbsp;&nbsp;&nbsp; <br \/>\nEnd Select&nbsp;&nbsp;&nbsp; <br \/>\nEnMonthName = Result&nbsp;&nbsp;&nbsp; <br \/>\nEnd Function&nbsp; <br \/>\n%&gt;<\/p>\n<p>\n&nbsp; \u628a\u4ee5\u4e0a\u4ee3\u7801\u4fdd\u5b58\u4e3arss.asp\u6587\u4ef6\uff0c\u4fee\u6539\u5176\u4e2d\u76f8\u5e94\u7684\u6570\u636e\u5e93\u8868\u5b57\u6bb5\u540e\uff0c\u5373\u53ef\u6210\u529f\u8f93\u51faRSS\u683c\u5f0f\u7684XML\u6587\u6863\u3002\u73b0\u5728\u4f60\u53ef\u4ee5\u9884\u89c8\u4ee5\u4e0b\u4f60\u505a\u597d\u7684rss\u6587\u4ef6\u4e86\uff0c\u662f\u4e0d\u662f\u6548\u679c\u51fa\u6765\u4e86<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4eca\u8d8a\u6765\u8d8a\u591a\u7684\u4eba\u5f00\u59cb\u5199\u8d77\u4e86\u535a\u5ba2\uff0c\u535a\u5ba2\u5e94\u8be5\u662f\u4e2a\u6027\u5f20\u626c\u7684\uff0c\u5e94\u8be5\u53cd\u5e94\u535a\u5ba2\u4e3b\u4eba\u5bf9\u751f\u6d3b\u7684\u67d0\u79cd\u8ba4\u77e5\uff0c\u8981\u4ee5\u539f\u521b\u7684\u5185\u5bb9\u4e3a\u4e3b\u3002\u53ea\u6709\u5199\u51fa\u4e86\u4e2a\u6027\uff0c\u5199\u51fa\u6709\u4ef7\u503c\u7684\u5185\u5bb9\u7684\u535a\u5ba2\u624d\u662f\u53ef\u770b\u7684\u535a\u5ba2\u3002\u5728\u53d1\u8868\u4e86\u4e00\u7bc7\u6587\u7ae0\u540e\uff0c\u5982\u4f55\u8ba9\u522b\u4eba\u7b2c\u4e00\u65f6\u95f4\u77e5\u9053\u5462\uff1fRSS\u8ba2\u9605\u529f\u80fd\u5c31\u53ef\u4ee5\u5b9e\u73b0\u4e86\u3002 &#038;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-339","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=339"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/339\/revisions"}],"predecessor-version":[{"id":66205,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/339\/revisions\/66205"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=339"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=339"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}