Witam,
mam mały problem, a mianowicie

pobieram sobie kanał RSS o budowie:

Kod
<?xml version="1.0" encoding="iso-8859-1" ?>
- <rss version="2.0">
- <channel>
  <title>DS</title>
  <description>Latest from D-S</description>
  <link>http://forums./index.php</link>
  <pubDate>Fri, 12 Sep 2008 11:34:28 -0400</pubDate>
  <ttl>1440</ttl>
- <item>
  <title>The </title>
  <link>http://forums./index.php?showtopic=2991</link>
- <description>
- <![CDATA[ Sorry   ]]>
  </description>
  <pubDate>Sun, 09 Dec 2007 19:13:48 -0500</pubDate>
  <guid>http://forums./index.php?showtopic=2991</guid>
  </item>
....


i pobieram to tak:

  1. <?php
  2. $simleXMLObject = simplexml_load_file('ht://forums./index.php?act=rssout&id=1');
  3.  
  4.  
  5. foreach($simpleXMLObject->channel->item as $item)
  6. {
  7.        echo $item->title;
  8. }
  9. ?>


jednakżę mam cały czas PHP Warning: Invalid argument supplied for foreach() in test.php on line 6


jak powinienem pobierać tego RSS'a aby poprawienie pobierać title z item'a