Hi all. There is a remote rss xml as shown. i wonder how i can parse it in php so that i can construct the following
echo statement:
echo “artist0=artistname0&name0=songname0&Image0=
There are 10 items in this xml at all time. I be happy if some one show me how achive this task.Thanks
php code:
[code]
<?php
$xml = file_get_contents(‘your-xml-file.xml’);
……………..
echo “artist0=artistname0&name0=songname0&Image0=http://www.somesite.com/pic0.jpg&artist1=artistname1&name1=songname1&Image1=http://www.somesite.com/pic1.jpg&….artist10=…”;
?>
remote rss xml format:
[code]
<playlist>
<song>
<artist>artistname0</artist>
<name>songname0</name>
<image>http://www.somesite.com/pic0.jpg</image>
<rating>3.26667</rating>
<songid>3043</songid>
<totalvotes>15</totalvotes>
</song>
<song>
<artist>artistname1</artist>
<name>songname1</name>
<image>http://www.somesite.com/pic1.jpg</image>
<rating>5</rating>
<songid>4935</songid>
<totalvotes>3</totalvotes>
</song>
….
….
</playlist>