Closed Thread
Results 1 to 2 of 2

Thread: php simple_xml_load_file

  1. #1
    jack202872 is offline x10Hosting Member jack202872 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    7

    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.

  2. #2
    jack202872 is offline x10Hosting Member jack202872 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    7

    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.

Closed Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers