/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?xml version="1.0" encoding="utf-8"?> <rss version="2.0"> <channel> <title>PHP generate RSS feed</title> <link>http://example.com/</link> <description>PHP generate RSS feed</description> <language>de-de</language> <?php //procedure for getting entities for your PHP generated RSS $listOfEntities = getList( $params ); foreach($listOfEntities as $entity) : ?> <item> <title><?php echo $entity['title']; ?></title> <description><?php echo $entity['description']; ?></description> <link>http://example.com/<?php echo $entity['url']; ?></link> </item> <?php endforeach; ?> </channel> </rss>
URL: http://stuntsnippets.com/php-generate-rss/
Comments
