以前收集的一些資料---使用ASP推出你自己網站的頻道

來源:互聯網
上載者:User
想自己產生自己網站的頻道檔案嗎,看看下面的代碼把。
這隻是個例子而已,但我想你完全可以根據它來建立你自己的頻道。
以後只要使用者下載該.cdf檔案,使用者就能夠訂閱你的網站的頻道了。
                    <%
                    '開啟資料庫連接,並定義用于格式化的變數.
                    Set DBConn = Server.CreateObject("ADODB.Connection")
                    DBConn.Open "DSN=YourDSN"

                    BR = Chr(10)
                    Quote = Chr(34)

                    '用來產生頻道格式
                    Body = "<CHANNEL " & BR
                    Body = Body & "Title = " & Quote & "你的公司名" & Quote & BR
                    Body = Body & "LongName = " & Quote & "你的詳細公司名" & Quote & BR
                    Body = Body & "Abstract = " & Quote & "你的頻道說明" & Quote & BR
                    '在你網站上產生的頻道檔案(.cdf)
                    Body = Body & "SELF = " & Quote & "http://yoururl/pointcast.cdf" & Quote & BR
                    Body = Body & "ContentID = " & Quote & "0" & Quote & BR
                    Body = Body & "Ratings = " & Quote & "'(PICS-1.1
                    "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America
                    Server" by "santry@pin-santry.com" for "http://yoururl.com" on
                    "1997.09.18T17:57-0800" r (n 0 s 0 v 0 l 0))'" & Quote & BR
                    Body = Body & "Frequency = " & Quote & "24" & Quote & BR
                    Body = Body & "Authenticate = " & Quote & "No" & Quote & BR
                    Body = Body & ">" & BR & BR

                    SQLQ = "SELECT * FROM YourDB WHERE ENTERDATE = #" & Date() & "#"
            '這將把今天的新東西都推出去
                    Set MakeChannel = DBConn.Execute(SQLQ)
                    Do Until MakeChannel.Eof
                        Body = Body & "<ITEM " & BR
                        Body = Body & "Title = " & Quote & MakeChannel("H



相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。