Anasayfa » ASP » RSS

RSS

7 Nisan 2010  |  Yazar: coders  |  Yorum Yok  |  4 kez okundu
Facebook'da Paylaş Twitter'da Paylas FriendFeed'de Paylaş RSS

Güncellenebilen sitelerde kullanılan ve ziyaretçiye siteye girmeden içeriği okutabilen servise adı verilmektedir.Bir servisi xml uzantılı olması koşulu yoktur. ve php ilede rss sayfaları tasarlanabilir ve ziyaretçiye okutulabilir.Okutma işlemleri genellikle Sharpreader tarzı programlarla okunabildiği gibi mozilla gibi browser lara eklenen reader plugin leri ilede aynı işlem yapılabilir.Aşağıda ile yazılmış örnek bir rss sayfasının kodları bulunmaktadır.Çalıştırıldığında hata almamak için tr karakterleri replace ederek temizliyoruz.Kendi sisteminize göre uyarlayarak kullanabilirsiniz.Örnek teşkil etmesi açısından yararlı bulunacağı kanaatindeyim.

< %

Set baglanti = Server.CreateObject(\"ADODB.Connection\" )

baglanti.Open \"DRIVER={Microsoft Access Driver (*.mdb )}; DBQ=\" & Server.MapPath(\"dbfiles/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

%>

http://www.sitename.com

Top 20

tr

< %

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 \"\"

Response.Write \"\"

Response.Write \" http://www.sitename.com/icerik.asp?id=\"& Temizle(rs(\"id\" ) ) &\"\"

Response.Write \"İcerik Aciklamasi : \" & Temizle(rs(\"icerik_aciklamasi\" ) ) & \"\"

Response.Write \"\"

i = i + 1

rs.MoveNext

Loop

rs.Close

%>
Facebok'ta Paylaş

Benzer Yazılar

Etiketler: , , , , , , , , , , , , , , , , , , , ,
avatar

Ahmet Ates

http://www.coders.gen.tr/ 25 yasindayim. Z.K.U Biyomedikal Cihaz Teknolojisi bölümünü okudum, Programlama dilleri arasindan ilgilendiğim ve profesyonel olarak hizmet verdiğim dil Fortran'dir. Web olarak Php,Css ve hazır sistemler olarak Wordpress ve Vbulletine hayranlık besliyorum.

Bu yazı hakkında birşeyler demek ister misiniz?

RSS üzerinden bu yazıya yapılan yorumları takip edin.

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir.

Şu HTML etiketlerini ve özelliklerini kullanabilirsiniz:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Programlama