Forum Moderators: coopster

Message Too Old, No Replies

PHP & RSS

Parsing and that

         

j4mes

4:53 pm on Jun 9, 2005 (gmt 0)

10+ Year Member



Hi,

I have a nice RSS feed of various TV channels (not mine but I can't link it obvs) and I'd like to use PHP to parse through, pick out the ones I like and present them with times.

Here's what it looks like:


<item>
<title>1800 : Programme</title>
<description> ... Description ... </description>
<link> ... Link ... </link>
</item>
With the whole day layed out in kind.

Since my PHP knowledge is relatively limited I wondered how easy this would be, and what the kind of code I should be using looks like.

Cheers,

J.

j4mes

5:02 pm on Jun 11, 2005 (gmt 0)

10+ Year Member



*cough*

RonPK

5:36 pm on Jun 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP has a couple of built-in XML methods. Maybe xml_parse_into_struct() is the one you need, as it parses XML data into arrays, which you can later loop through.

On [php.net...] you'll find some examples of parsing XML data.

The really hard part will be to code "pick out the ones I like" into the script ;)