<%
'|======================================
'| Veritabanındaki Verilerin XML'e Göre Yayınlanması
'| mydesign a.k.a doronty37
'| http://www.mydesign.gen.tr
'| mydesign@mydesign.gen.tr
'|======================================
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("veritabani.mdb")
Function Temizle(strInput)
strInput = Replace(strInput,"&", "&")
strInput = Replace(strInput, ">", "<")
strInput = Replace(strInput,"<",">")
Temizle = strInput
End Function
Response.Write "<rss version=""2.0"">"
Response.Write "<channel>"
Response.Write "<title>Site Başlığı</title>"
Response.Write "<link>http://www.siteadresi.com</link>"
Response.Write "<description>Site Açıklaması</description>"
Response.Write "<language>tr</language>"
set rs = Server.CreateObject("Adodb.Recordset")
SQL = "select * from tablo order by tarih desc"
rs.Open SQL, adoCon, 1, 3
i = 0
Do While not rs.EOF and i < 10
response.write("<item>")
response.write("<title>" & Temizle(rs("baslik")) & "</title>")
response.write("<link>http://www.d0gma.org/d0gma/proje_oku.asp?ID="& rs("id") &"</link>")
response.write("<description>" & Temizle(rs("ozet")) & "</description>")
response.write("</item>")
i = i + 1
rs.MoveNext
Loop
rs.Close
set rs = Nothing
Response.Write "</channel>"
Response.Write "</rss>"
%>