Here is the simple code to read RSS Feeds using php with simpladxml_load_string function.
CODE:
CODE:
1 : <?php
2 : $displayItems = 5;
3 : $itemCounter = 0;
4 : $rss = simplexml_load_file("http://put here url of RSS Feed");
5 : foreach($rss->channel->item as $feeds){
6 : $itemCounter++;
7 : echo '<li><a href="'.$feeds->link.'">'.$feeds->title.'</a><br /><br />';
8 : if($itemCounter==$displayItems)break;
9 : }
10 : ?>
Comments
Post a Comment