Jump to content

Trying to Print out RSS Feeds


Recommended Posts

I found this php script lastRSS.  That will spit out your RSS feed headers as an ul list.  I just can't make it work.

 

The instructions are to place the snippet of code on your page.  Here is what I have:

 

	<h1>News Test</h1>

<?php
// include lastRSS library
  include 'lastRSS.php';
  
  // create lastRSS object
  $rss = new lastRSS; 
  
  // setup transparent cache
  $rss->cache_dir = './cache'; 
  $rss->cache_time = 3600; // one hour
  
  // load some RSS file
  if ($rs = $rss->get('http://tulanelib.blogspot.com/feeds/posts/default')) {
  	// here we can work with RSS fields
  }
  else {
  	die ('Error: RSS file not found...');
  }
  ?>

 

, then the author gives you the file lastRSS.php to upload to the same directory.  (Which I have done).  But nothing prints out.  See example here.

 

 

Link to comment
https://forums.phpfreaks.com/topic/55279-trying-to-print-out-rss-feeds/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.