How to RSS Feeds from others sites

How to RSS Feeds from others sites

bharat bharat -
回帖数: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

回复bharat bharat

Re: How to RSS Feeds from others sites

Jon Bolton -
Testers的头像

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

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.

回复Jon Bolton

Re: How to RSS Feeds from others sites

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);
回复bharat bharat

Re: How to RSS Feeds from others sites

Jon Bolton -
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".