📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
blogscripti.demodesign.com.tr
📝
rss.php
← Geri Dön
<?php include('admin/inc/config.php'); // RSS başlık ve açıklaması $rssTitle = "Google Publisher RSS"; $rssDescription = "Google Publisher için oluşturulan RSS beslemesi"; // RSS beslemesini oluştur $rssFeed = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL; $rssFeed .= '<rss version="2.0">' . PHP_EOL; $rssFeed .= '<channel>' . PHP_EOL; $rssFeed .= '<title>' . $rssTitle . '</title>' . PHP_EOL; $rssFeed .= '<description>' . $rssDescription . '</description>' . PHP_EOL; // Makaleleri sorgula $query = "SELECT * FROM blog WHERE tur = 'blog' ORDER BY olusturmazamani DESC"; $stmt = $db->prepare($query); $stmt->execute(); $articles = $stmt->fetchAll(PDO::FETCH_ASSOC); // Her makale için RSS öğesi oluştur foreach ($articles as $article) { $title = $article['baslik']; $link = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $article['seolink']; $description = $article['icerik']; $pubDate = date("r", strtotime($article['olusturmazamani'])); $image = 'https://' . $_SERVER['HTTP_HOST'] . '/' . preg_replace('/\.\.\//', '', $article['resim']); $rssFeed .= '<item>' . PHP_EOL; $rssFeed .= '<title>' . $title . '</title>' . PHP_EOL; $rssFeed .= '<link>' . $link . '</link>' . PHP_EOL; $rssFeed .= '<description>' . htmlspecialchars($description, ENT_XML1 | ENT_COMPAT, 'UTF-8') . '</description>' . PHP_EOL; $rssFeed .= '<pubDate>' . $pubDate . '</pubDate>' . PHP_EOL; $rssFeed .= '<image>' . $image . '</image>' . PHP_EOL; // Resim öğesi eklendi $rssFeed .= '</item>' . PHP_EOL; } $rssFeed .= '</channel>' . PHP_EOL; $rssFeed .= '</rss>' . PHP_EOL; // Tarayıcıda .xml dosyasını göster header('Content-Type: application/xml; charset=utf-8'); echo $rssFeed; ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula