عرض مشاركة واحدة
قديم 06-06-2019, 10:15 PM
المشاركة 2
Mohamed yasser
مشرف قسم تطوير المواقع
.:: مطور لغة PHP ::.
  • Mohamed yasser غير متواجد حالياً
افتراضي رد: خريطة منتداك بصيغة php , خريطة منتداك بصيغة sitemap.php , وسر ظهور Noindex
موضوع جميل جدا
وده التعديل لو عايز تعمل استثناء لقسم
كود PHP:
<?php
require('./global.php');
$siteurl "https://www.helpernt.com/vb";

header('Content-type: text/xml');

echo 
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
echo 
"<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";


$result mysql_query("SELECT title, threadid , forumid FROM thread ORDER BY threadid desc");
while(
$row mysql_fetch_assoc($result))
{
if(
$row['forumid'] != AND  $row['forumid'] != 1
echo 
"\n<url>\n<loc>".$siteurl."/showthread.php?t=".$row["threadid"]."</loc>\n<changefreq>daily</changefreq>\n</url>";
}
}

echo 
"\n</urlset>";
?>
انا عامل استثناء لقسم الشكاوي الي هو رقم 9
كود PHP:
if($row['forumid'] != AND  $row['forumid'] != 1
رقم 1 ده لو عايز تغيره غيرها لو عايز تحذف احذف انا عملت اثتناء كده لقسم رقم 9 و رقم 1