-
php simple_xml_load_file
Hello,
I used to import an RSS feed into some of my web pages, but it does not work as well as usual.
I do it like this:
[code] $ rss = simplexml_load_file ('http://blog2011.grand-rodez.com/feed/');
foreach ($ rss-> channel-> item as $ item) {
if (strtotime ($ item-> pubDate)> = strtotime ("-1 week")) {
echo '<h3>. ucfirst (strtolower ($ item-> title )).'</ h3>
<p> '. $ Item-> description. "<br/>
Posted on '. Date ("d / m / Y", strtotime ($ item-> pubDate )).'</ p>
link href ="'.$ item-> <p> <a.'"> Read the article </ a> </ p >';[/ code]
It does not work with "http://blog2011.grand-rodez.com/feed/" (well .. locally, yes, but not online), while it works with "http://www.cm-lozere.fr/rss/feed/CRMA_nouvelles "
I do not understand why. And the problem is that I prefer the first.
Is there a link with the recent transition to PHP 5?
Last edited by jack202872; 08-30-2011 at 01:26 PM.
-
Re: php simple_xml_load_file
I don't know why, but it works again.
I close the thread.
thx.
Last edited by jack202872; 08-31-2011 at 09:46 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules