1

Topic: using rss to import news on my site

Hi,

I'm looking for a simple solution to import rss on my site.
What I want to import is here: http://www.freenews.fr/feeds/rss.php
I tried making an include in php but I got a parse error. I think include can not be used for this kind of thing.
A long time ago, I found a generator on line, on a website, but I'm not able to refind it. This generator worked good. You just have to put your rss adress and it gives you the php code to insert in your page.
Can somebody tell me how to make what I want or where to find methods to do it.

Thanksfully,

Ludo,

2

Re: using rss to import news on my site

I had the same question about a month ago.  Searching google using 'rss web page display php', you'll find SitePoint's tutorial.  It's a good way to get started (it works on my site) but the script it teaches you to use is only meant for RSS 1.0 -- that can potentially cause problems with newer feeds.  Searching google again I found MagpieRSS, which looks like one of the best parsers available.  Once you catch the RSS bug you may also be interested in the MyHeadlines web scrapersmile enjoy!

3

Re: using rss to import news on my site

First, thanks for the reply.
What you suggested me to see is quite difficult to understand. I'm looking for something like that http://www.actifpub.com/code_blog.php but in english and without any advertisement. You just have to put the url and it gives you a php code but with an advertisement which is very annoying....
I do not want to use any parser like magpierss. I want the flux to be included directly.

Ludo,

4

Re: using rss to import news on my site

Take another look at SitePoint's tutorial.  This is exactly what you're asking for.  It's a lot easier to use than you think:

Use the code on this page - http://www.sitepoint.com/article/php-xm … -rss-1-0/4
At the bottom of that page there's a link to an example of how to include it on your page - http://www.sitepoint.com/examples/phpxm … oo.php.txt

Just replace 'http://www.sitepoint.com/rss.php' with the URL of your RSS feed.

5 (edited by Ludo 2005-02-02 23:17)

Re: using rss to import news on my site

What you gave me is very interesting. It works very good with http://www.freenews.fr/feeds/rss.php which uses rss 1.
I also want to use a feed in RSS 2 for example that one : http://www.liberation.fr/rss.php . Have you got a similar example with RSS 2?

Thanks a lot,

Ludo,