Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
- <?php header("Content-type: text/xml");
- echo '<'.'?xml version="1.0" encoding="ISO-8859-1"?'.'>'; ?>
- <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
- <channel>
- <title>HeroFire.de RSS-Feeds</title>
- <language>de</language>
- <link>http://HeroFire.net</link>
- <description>News,Event,User</description>
- <copyright>Copyright <?php date(y); ?> HeroFire.net</copyright>
- <?php
- require_once('./_config/core.php');
- // Datenbankabfrage
- $query = "SELECT id, author, title, shortstory, published FROM cms_news ORDER BY id DESC LIMIT 2";
- $result = mysql_query($query) or die (mysql_error());
- // Ausgabe der Daten
- while ($row = mysql_fetch_array($result)){
- $id = $row['id'];
- $title = $row['title'];
- $shortstory = $row['shortstory'];
- $published = strtotime($row['date']);
- ?>
- <item>
- <title><?php echo $title; ?></title>
- <link>http://herofire.net/articles/<?php echo $id; ?></link>
- <guid isPermaLink="false">http://herofire.net/articles</guid>
- <pubDate>Geschrieben am: <?php echo date('d.m.Y'); ?></pubDate>
- <description><![CDATA[ <?php echo $shortstory; ?> ]]></description>
- </item>
- <?php } /* close while*/ ?>
- </channel>
- </rss>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement