| Konu Bilgileri |
|
|
|
|
|
|
|
|
Konuyu Oyla:
- Derecelendirme: 0/5 - 0 oy
- 1
- 2
- 3
- 4
- 5
PHP Sitemap Oluşturucu
|
Üyelik Süresi hesaplanıyor...
Kayıt Tarihi: May 2021
Yorumları: 573
Konuları: 246
Ruh hali:
Cinsiyet: Erkek
Ülke: Türkiye
Şehir: Kocaeli
Takımı: Belirtilmedi
Alınan Beğeni: 64
Verilen Beğeni: 74
🏅 Kazanılan Rozetler
🛡️
💖
🏆
🌟
🧭
🚀
💎
👑
📅
💼
👍
✅
❤️
03-12-2021 Saat 20:10
SQL Kodlarını kendinize göre düzenleyiniz. Kodlar:
Kod: require_once('config.ph');
header('Content-Type: text/xml');
echo '
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
';
foreach($dbh->query("SELECT * FROM news WHERE news_status = 1 ORDER BY news_title ASC") as $dataRow){
echo '
<url><loc>https://yoursite.com/post/'.$dataRow['news_seo'].'</loc></url>
<changefreq></changefreq>
<lastmod>'.date("Y-m-d", strtotime($dataRow['news_date'])).'</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>';
}
echo '</urlset>';
HTAccess dosyasına aşağıdaki kodu ekleyiniz:
Kod: RewriteRule ^sitemap.xml$ sitemap.php [L, NC, QSA]
|

Konuyu Okuyanlar: 1 Ziyaretçi