How to RSS Feeds from others sites

How to RSS Feeds from others sites

av bharat bharat -
Antall svar: 3
Hi

How to fetch rss feeds from others website using moodle code. i am trying to use function
include($CFG->libdir.'/magpie/rss_fetch.inc')
$url="http://www.spectroscopynow.com/coi/rss/News_1_1.xml";
$rss = fetch_rss($url);

But it is not working. this function return false. Any body can help me for this problem. if you have already code. Please give it me

Thanks

Gjennomsnittlig vurdering: -
Som svar til bharat bharat

Re: How to RSS Feeds from others sites

av Jon Bolton -
Bilde av Particularly helpful Moodlers Bilde av Testers

Why not just use the RSS feeds block? Very simple and easy to use smiler

The other thing I use is Feed2JS, which allows me to put RSS feeds anywhere on the page without using a sidebar block. You can see working examples on my site here and here.

Som svar til Jon Bolton

Re: How to RSS Feeds from others sites

av bharat bharat -
Actually i want to use moodle code for rss feeds in other website. there is no instalation for new. but i have all the package related to news.

Thats why i want code, if any body use this fucnction

$rss = fetch_rss($url);
Som svar til bharat bharat

Re: How to RSS Feeds from others sites

av Jon Bolton -
Bilde av Particularly helpful Moodlers Bilde av Testers

Sorry, I'm afraid I'm not clear about what you actually want.

If you want to publish news from your Moodle forums (or databases, glossaries and blogs) as an RSS feed, that's already included, but you need to configure it in a number of places on your Moodle installation. Have a look at http://moodle.org/mod/forum/discuss.php?d=59559#p270301 along with http://docs.moodle.org/en/RSS and http://docs.moodle.org/en/RSS_in_Forums

If you want to generate an RSS feed for the content of your other site, you'll need various code libraries, eg. magpie. Have a look on Google for "RSS feed generation software" or "RSS feed generation script".