Jump to content


Photo

Read Rss Feed And Put Into Array


  • Please log in to reply
2 replies to this topic

#1 Pythondev

Pythondev
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 27 June 2006 - 06:55 PM

Ok,

I want to read a RSS feed and extract some of its contents and put them into arrays.

For example take a look at this snippet of an RSS feed from my site:


<item>
<title>Glass Material</title>
<link>
http://www.tutorialdash.com/tutorial/3d-studio-max/textures/view/Glass-Material
</link>
<description>Glass Material - 3D Studio Max Tutorials</description>
</item>
<item>
<title>Cool Explosion</title>
<link>
http://www.tutorialdash.com/tutorial/3d-studio-max/special-effects/view/Cool-Explosion
</link>
<description>Cool Explosion - 3D Studio Max Tutorials</description>
</item>
<item>
<title>Cigarette Smoke</title>
<link>
http://www.tutorialdash.com/tutorial/3d-studio-max/special-effects/view/Cigarette-Smoke
</link>
<description>Cigarette Smoke - 3D Studio Max Tutorials</description>
</item>

There are three items here - after running it I want to have an array something like the following...

$item[0] = first item
$item[1] = second item
$item[2] = third item

$item[0][0] = first items title
$item[0][1] = first items link



etc..... How can this be done?


Remember this will in fact go through 25+ items each time not just 3...

Thanks

#2 adamwhiles

adamwhiles
  • Members
  • PipPipPip
  • Advanced Member
  • 54 posts

Posted 27 June 2006 - 07:50 PM

I think this may be what your looking for:

[a href=\"http://magpierss.sourceforge.net/\" target=\"_blank\"]http://magpierss.sourceforge.net/[/a]

#3 Pythondev

Pythondev
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 27 June 2006 - 08:38 PM

Perfect :D

Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users