rss

Get general support for ADP here.

Moderator: pgolovko

rss

Postby peci » 11/30/2009 11:24 am

root/rss.php

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>

:-D
peci
 
Posts: 13
Joined: 07/05/2007 12:48 am


Return to Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron