Birçok sitede görülen RSS, sitelerimizin vazgecilmezlerindendir.
RSS'ler genellikle haber, indirme sitelerinde kullanılmaktadır. Sitemizdeki içeriklerin ziyaretcilere yardımcı bir programla göstermeye yarar.
<%
Set baglanti = Server.CreateObject("ADODB.Connection")
baglanti.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database/db.mdb")
Response.Buffer = True
Response.ContentType = "text/xml"
Function Temizle(strInput)
      strInput = Replace(strInput,"&", "&")
      strInput = Replace(strInput,"'", "'")
      strInput = Replace(strInput,"""", """)
      strInput = Replace(strInput,">", ">")
      strInput = Replace(strInput,"<","<")
      strInput = Replace(strInput,"İ","I")
      strInput = Replace(strInput,"Ş","S")
      strInput = Replace(strInput,"Ü","U")
      strInput = Replace(strInput,"Ö","O")
      strInput = Replace(strInput,"Ç","C")
      strInput = Replace(strInput,"Ğ","G")
      strInput = Replace(strInput,"ğ","g")
      strInput = Replace(strInput,"ı","i")
      strInput = Replace(strInput,"ş","s")
      strInput = Replace(strInput,"ü","u")
      strInput = Replace(strInput,"ö","o")
      strInput = Replace(strInput,"ç","c")
      Temizle = strInput
End Function
%>
<rss version="2.0">
<channel>
<title>SİTENİZİN ADI</title>
<link>http://www.sitenizinadresi.com</link>
<description>En Son Eklenen 20 İçerik</description>
<language>tr</language>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "Select * from tablo_adi order by tarih desc"
rs.Open SQL,baglanti,1,3
i = 0
Do While i =< 19 And Not rs.Eof
Response.Write "<item>"
Response.Write "<title>" & Temizle(rs("icerik_adi")) & "</title>"
Response.Write "<link>http://www.sitenizinadresi.com/icerik.asp?id="& Temizle(rs("id")) &"</link>"
Response.Write "<description>İcerik Aciklamasi : " & Temizle(rs("icerik_aciklamasi")) & "</description>"
Response.Write "</item>"
i = i + 1
rs.MoveNext
Loop
rs.Close
%></channel></rss>
RSS sayfasında, aşağıda yer alan hatayı alırsanız Türkçe karakterleri düzenleyerek bu hatayı giderebilirsiniz.
“An invalid character was found in text content. Error processing resource”
İlgili yerleri kendinize göre düzenleyiniz arkadaşlar.