hi all,
I am considering to sydicate the content from my BLOG db. Can you guys suggest has to how to do this?
Presently, I am thinking of doing it this way...
Upon submit, i use a function this:
Public Sub RSS()
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText(MapPath("~/RSS.xml"))
oWrite.WriteLine(" <?xml version=""1.0"" ?>")
oWrite.WriteLine("- <rss version=""2.0"" xmlns:dc=""http://purl.org/dc/elements/1.1/"">")
oWrite.WriteLine("- <channel>")
oWrite.WriteLine(" <title></title>")
oWrite.WriteLine(" <link></link>")
oWrite.WriteLine(" <description></description>")
oWrite.WriteLine(" <language></language>")
oWrite.WriteLine(" <copyright>/copyright>")
For i = 1 To 5 'I only want to syndicate the lastest 5 entries
oWrite.Close()
End Sub
Is this a good approach? And also, how would I connect to the db and drag out only five of the latest entries. Oh, there is one condition though, my blogs are moderated, so it can only be approved blogs.
I would appreciate any comments. Thanx in advanced.
-a8le
I am considering to sydicate the content from my BLOG db. Can you guys suggest has to how to do this?
Presently, I am thinking of doing it this way...
Upon submit, i use a function this:
Public Sub RSS()
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText(MapPath("~/RSS.xml"))
oWrite.WriteLine(" <?xml version=""1.0"" ?>")
oWrite.WriteLine("- <rss version=""2.0"" xmlns:dc=""http://purl.org/dc/elements/1.1/"">")
oWrite.WriteLine("- <channel>")
oWrite.WriteLine(" <title></title>")
oWrite.WriteLine(" <link></link>")
oWrite.WriteLine(" <description></description>")
oWrite.WriteLine(" <language></language>")
oWrite.WriteLine(" <copyright>/copyright>")
For i = 1 To 5 'I only want to syndicate the lastest 5 entries
oWrite.WriteLine("- <item>")
oWrite.WriteLine(" <title></title> ")
oWrite.WriteLine(" <description></description>")
oWrite.WriteLine(" <link></link>")
oWrite.WriteLine(" </item>")
Next ioWrite.WriteLine(" <description></description>")
oWrite.WriteLine(" <link></link>")
oWrite.WriteLine(" </item>")
oWrite.Close()
End Sub
Is this a good approach? And also, how would I connect to the db and drag out only five of the latest entries. Oh, there is one condition though, my blogs are moderated, so it can only be approved blogs.
I would appreciate any comments. Thanx in advanced.
-a8le