demo
http://feedburner.google.com/fb/a/mailv ... 40070/iplg
http://40070.org
http://40070.org/rss.php
- Code: Select all
<?php header('Content-type: application/rss+xml'); ?>
<?php echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="http://www.example.com/rss.php" rel="self" type="application/rss+xml" />
<title>News 40070.org</title>
<description>ADP news 40070.org</description>
<link>http://www.example.com</link>
<?php
include ('admin/database.php');
$result = mysql_query("SELECT id, title, description, date FROM links ORDER by date DESC LIMIT 5")
or die(mysql_error());
while($row = mysql_fetch_array($result)){
?>
<item>
<title> <?php echo $row['title']; ?></title>
<description><?php echo htmlspecialchars($row['description'], ENT_QUOTES);?></description>
<link>http://www.example.com/?id=<?php echo $row['id']; ?></link>
<pubDate> <?php echo date("r", strtotime($row["date"])); ?></pubDate>
</item>
<?php
}
?>
</channel>
</rss>
