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
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.
Thats why i want code, if any body use this fucnction
$rss = fetch_rss($url);
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".