SADECE WMARACINDA İNAN HİÇ BİR YERDE BULUMASSINIZ.
Bilen bilir web sitenin sitemap'ını oluşturmak ayrı bi dert googleye bildirmek ayrı bir dert. Bide asıl dert sitenin tüm haritasını çıkaramamak çünkü netteki online sitemap generatörler limitli oluyor. Az önce bu sorunu fso yardımı ile çözdüm ve sizlede paylaşmak istedim. Güle güle kullanın.
Bu kodu alıpta başka sitede paylaşanlar lütfen kaynak göstersin emektir yani paylaşımdan sogutmayın insanları :)
KODLAMA BAŞLIYOR
<%
mode = request.querystring("mode")
if mode = "msmap" then
call msmap
elseif mode = "wsmap" then
call wsmap
else
end if
%>
Oluştur (Web)
Oluştur (Mobil)
<%
sub wsmap
On error resume next
strRootFolder = Request.ServerVariables("APPL_PHYSICAL_PATH")
intLenRootFolder = Len(strRootFolder)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(strRootFolder & "sitemap/web.xml", True, False)
objFile.Write("") & VbCrLf
objFile.Write("http://www.sitemaps.org/schemas/sitemap/0.9/sitema p.xsd"">") & VbCrLf
set rscat = createobject("adodb.recordset")
rscat.open "select id,kategori from ana_kategoriler order by id asc", conn, 3,3
for i = 1 to rscat.recordcount
if rscat.eof then exit for
objFile.Write("") & VbCrLf
objFile.Write(""&site_url&"/kategoriler.asp?katid="&rscat("id")&"&"&lcase(cevir(rscat("kategori")))&".html ") & VbCrLf
objFile.Write("daily ") & VbCrLf
objFile.Write(" ") & VbCrLf
set rssubcat = conn.execute("select id,kategori from alt_kategoriler where ana_katid = "&rscat("id")&" order by sira asc")
do while not rssubcat.eof
objFile.Write("") & VbCrLf
objFile.Write(""&site_url&"/konular.asp?kid="&rssubcat("id")&"&"&lcase(cevir(rssubcat("kategori")))&".html ") & VbCrLf
objFile.Write("daily ") & VbCrLf
objFile.Write(" ") & VbCrLf
rssubcat.movenext : loop : rscat.movenext : next : rscat.close : set rscat = nothing : rssubcat.close : set rssubcat = nothing
set rs = server.createobject("adodb.recordset")
rs.open "select id,baslik from icerikler order by id asc", conn,3,3
response.buffer = true
do while not rs.eof
objFile.Write("") & VbCrLf
objFile.Write(""&site_url&"/konu.asp?sid="&rs("id")&"&"&lcase(cevir(rs("baslik")))&".html ") & VbCrLf
objFile.Write("daily ") & VbCrLf
objFile.Write(" ") & VbCrLf
rs.movenext : loop
objFile.Write(" ")
objFile.close
Set objFile = Nothing
Set objFSO = Nothing
rs.close : set rs = nothing
%>
<%end sub%>
<%
sub msmap
On error resume next
strRootFolder = Request.ServerVariables("APPL_PHYSICAL_PATH")
intLenRootFolder = Len(strRootFolder)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(strRootFolder & "sitemap/mobil.xml", True, False)
objFile.Write("") & VbCrLf
objFile.Write("") & VbCrLf
set rscat = createobject("adodb.recordset")
rscat.open "select id,kategori from ana_kategoriler order by id asc", conn, 3,3
for i = 1 to rscat.recordcount
if rscat.eof then exit for
objFile.Write("") & VbCrLf
objFile.Write(""&site_url&"/mobil/kategoriler.asp?katid="&rscat("id")&"&"&lcase(cevir(rscat("kategori")))&".html ") & VbCrLf
objFile.Write(" ") & VbCrLf
objFile.Write(" ") & VbCrLf
set rssubcat = conn.execute("select id,kategori from alt_kategoriler where ana_katid = "&rscat("id")&" order by sira asc")
do while not rssubcat.eof
objFile.Write("") & VbCrLf
objFile.Write(""&site_url&"/mobil/konular.asp?kid="&rssubcat("id")&"&"&lcase(cevir(rssubcat("kategori")))&".html ") & VbCrLf
objFile.Write(" ") & VbCrLf
objFile.Write(" ") & VbCrLf
rssubcat.movenext : loop : rscat.movenext : next : rscat.close : set rscat = nothing : rssubcat.close : set rssubcat = nothing
set rs = server.createobject("adodb.recordset")
rs.open "select id,baslik from icerikler order by id asc", conn,3,3
response.buffer = true
do while not rs.eof
objFile.Write("") & VbCrLf
objFile.Write(""&site_url&"/mobil/konu.asp?sid="&rs("id")&"&"&lcase(cevir(rs("baslik")))&".html ") & VbCrLf
objFile.Write(" ") & VbCrLf
objFile.Write(" ") & VbCrLf
rs.movenext : loop
objFile.Write(" ")
objFile.close
Set objFile = Nothing
Set objFSO = Nothing
rs.close : set rs = nothing
%>
<%end sub%>
* SİTEMAP KLASÖRÜNE YAZMA İZNİ VERİLMESİ GEREKİYOR.
Ek Olarak:
Ek Olarak: