• 13-12-2008, 13:52:07
    #1
    <?php
    include('ayarlar.php');
    header('Content-type: text/xml');
    echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
    echo '<!-- generated-on="'.date("d M Y H:i").'" -->'."\n".'<urlset 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" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
    echo "<urlset>";
    $sql = mysql_query("Select * from sarki_sozleri order by RAND() LIMIT 200");
    while($r1= @mysql_fetch_array($sql)) {
    ?>
    <url>
    	<loc><a href=<?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/><?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/</a><p></loc>
        <lastmod><?=$r1[tarih];?></lastmod>
        <changefreq>always</changefreq>
        <priority>0.9</priority>
    </url>
    <? } echo '</urlset>'; ?>

    Hata bu :

    XML Ayrıştırma Hatası: iyi düzenlenmiş değilLocation: Şarkı Sözü Scripti Number 5, Column 15: <loc><a href=http://sarkisozu.webadam.com/sarki-sozleri/quo-vadis-canada-break-the-cycle/>http://sarkisozu.webadam.com/sarki-sozleri/quo-vadis-canada-break-the-cycle/</a><p></loc>
    ---------------------^

    Nerde hata yapmış olabilirim.
  • 13-12-2008, 14:04:50
    #2
    Yardım edebilecek olan var mı ?
  • 13-12-2008, 16:21:53
    #3
    webadam adlı üyeden alıntı: mesajı görüntüle
    <?php
    include('ayarlar.php');
    header('Content-type: text/xml');
    echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
    echo '<!-- generated-on="'.date("d M Y H:i").'" -->'."\n".'<urlset 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" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
    echo "<urlset>";
    $sql = mysql_query("Select * from sarki_sozleri order by RAND() LIMIT 200");
    while($r1= @mysql_fetch_array($sql)) {
    ?>
    <url>
    	<loc><a href=<?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/><?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/</a><p></loc>
        <lastmod><?=$r1[tarih];?></lastmod>
        <changefreq>always</changefreq>
        <priority>0.9</priority>
    </url>
    <? } echo '</urlset>'; ?>
    Hata bu :
    XML Ayrıştırma Hatası: iyi düzenlenmiş değilLocation: Şarkı Sözü Scripti Number 5, Column 15: <loc><a href=http://sarkisozu.webadam.com/sarki-sozleri/quo-vadis-canada-break-the-cycle/>http://sarkisozu.webadam.com/sarki-sozleri/quo-vadis-canada-break-the-cycle/</a><p></loc>
    ---------------------^
    Nerde hata yapmış olabilirim.
    Böyle denermisin;
    <?
    echo '<?xml version="1.0" encoding="ISO-8859-9"?>
    
    <?xml-stylesheet type="text/xsl" href="sitemap.xsl"?><!-- generator="HRMNKY/2.1" -->
    
    <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/09/sitemap.xsd"	xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';?>
    
    <url>
    	<loc><a href=<?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/><?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/</a><p></loc>
        <lastmod><?=$r1[tarih];?></lastmod>
        <changefreq>always</changefreq>
        <priority>0.9</priority>
    </url>
    <?
    echo "
    
    </urlset>";?>
  • 13-12-2008, 18:33:22
    #4
    anchor veriyorsun ( a href ), sitemap protokülüne aykırı. <p> de kullanmışsın, XML içinde bu şekilde HTML de kullanamazsın.

    <url>
    		<loc>http://www.phpbbturkiye.net/viewtopic.php?f=20&amp;t=4266</loc>
    		<lastmod>2008-12-12T17:25:49Z</lastmod>
    		<changefreq>hourly</changefreq>
    		<priority>0.6</priority>
    	</url>
  • 13-12-2008, 21:10:28
    #5
    <?php
    include('ayarlar.php');
    header('Content-type: text/xml');
    echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
    echo '<!-- generated-on="'.date("d M Y H:i").'" -->'."\n".'<urlset 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" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
    echo "<urlset>";
    $sql = mysql_query("Select * from sarki_sozleri order by RAND() LIMIT 200");
    while($r1= @mysql_fetch_array($sql)) {
    ?>
    <url>
    	<loc><?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/</loc>
        <lastmod><?=$r1[tarih];?></lastmod>
        <changefreq>always</changefreq>
        <priority>0.9</priority>
    </url>
    <? } echo '</urlset>'; ?>
    yaptığım halde sorun devam ediyor
  • 13-12-2008, 21:41:10
    #6
    Çözebilen yok mu ?
  • 13-12-2008, 23:52:49
    #7
    <?php
    include('ayarlar.php');
    header('Content-type: text/xml');
    echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
    echo '<!-- generated-on="'.date("d M Y H:i").'" -->'."\n".'<urlset 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" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
    // urlset ustteki gibi olusturulmalidir burayi ve alttaki yorum satirini siliniz
    // echo "<urlset>";
    $sql = mysql_query("Select * from sarki_sozleri order by RAND() LIMIT 200");
    while($r1= @mysql_fetch_array($sql)) {
    ?>
    <url>
        <loc><?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/</loc>
        <lastmod><?=$r1[tarih];?></lastmod>
        <changefreq>always</changefreq>
        <priority>0.9</priority>
    </url>
    <? } echo '</urlset>'; ?>
    birde bu şekilde dener misiniz eğer olmazsa
    bana özel mesajla msn adresinizi verin yardımcı olayım
  • 14-12-2008, 02:47:02
    #8
    Denedim hala sorun devam ediyor.
  • 14-12-2008, 07:32:40
    #9
    <?php 
    include('ayarlar.php'); 
    header('Content-type: text/xml'); 
    echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; 
    echo '<!-- generated-on="'.date("d M Y H:i").'" -->'."\n".'<urlset 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" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n"; 
    echo "<urlset>"; 
    $sql = mysql_query("Select * from sarki_sozleri order by RAND() LIMIT 200"); 
    while($r1= @mysql_fetch_array($sql)) { 
    ?> 
    <url> 
        <loc><?=$url;?>/sarki-sozleri/<?=$r1[baslik_seo];?>/</loc> 
        <lastmod><?=$r1[tarih];?></lastmod> 
        <changefreq>always</changefreq> 
        <priority>0.9</priority> 
    </url> 
    <? } echo '</urlset>'; ?>