Şimdi Ara

Mybb Dinamik Sitemap Oluşturma (Yardım)

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
2 Misafir - 2 Masaüstü
5 sn
2
Cevap
0
Favori
906
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • Merhaba arkadaşlar.

    Mybb bir forum sitesinde dinamik sitemap oluşturmak istiyorum. Yardımcı olur musunuz?

    Nerede yanlış yapıyorum.




    <?php
    ## Veritabanı bağlantısı yapalım.
    @mysql_select_db("db", mysql_connect("localhost","kullanıcı adı","sifre"));
    ## Xml olarak göstermek için girilen komut
    header("Content-Type: text/xml");
    ## Sitemap Bilgileri
    echo '';
    echo '
    <urlset
    xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://www.sitemaps.org/schemas/sitemap/0.9
    http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
    ';

    ## Site Menüleri
    echo '
    <url>
    <loc>http://www.xxx.com/</loc>
    <lastmod>'.date("Y").'-'.date("m").'-'.date("d").'T'.date("H:i:s").'+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.5000</priority>
    </url>
    <url>
    <loc>http://www.xxx.com/portal.php</loc>
    <lastmod>'.date("Y").'-'.date("m").'-'.date("d").'T'.date("H:i:s").'+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.8000</priority>
    </url>
    <url>
    <loc>http://www.xxx.com/search.php</loc>
    <lastmod>'.date("Y").'-'.date("m").'-'.date("d").'T'.date("H:i:s").'+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.8000</priority>
    </url>
    <url>
    <loc>http://www.xxx.com/memberlist.php</loc>
    <lastmod>'.date("Y").'-'.date("m").'-'.date("d").'T'.date("H:i:s").'+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.8000</priority>
    </url>
    <url>
    <loc>http://www.xxx.com/misc.php?action=help</loc>
    <lastmod>'.date("Y").'-'.date("m").'-'.date("d").'T'.date("H:i:s").'+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.8000</priority>
    </url>
    ';

    ## Makaleleri Listele
    $Makaleler = mysql_query("select * from makale where durum='0' order by id DESC");
    while($Row = mysql_fetch_array($Makaleler)){

    echo'
    <url>
    <loc>http://www.xxx.com/'.$Row["subject"].'.html</loc>
    <lastmod>'.date("Y").'-'.date("m").'-'.date("d").'T'.date("H:i:s").'+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.5000</priority>
    </url>
    ';
    }

    echo '</urlset>';
    ?>



    < Bu mesaj bu kişi tarafından değiştirildi takalar1381 -- 23 Eylül 2017; 14:46:6 >







  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.