PHP script to extract track details from tracklist.xspf file

reggiem

New Member
I want extract audio stream track details from tracklist.xspf file stored on remote server and print output on web page as scrolling text inside div, so PHP script should print current track info.I want get details from tags 'title', 'annotation' (only Stream Title:) and 'info'. For last 'info' tag, I want to make it can be turned off and instead I will scroll my custom (preset) text. The track info on page need be periodically refreshed to get current track details.the tracklist.xspf file content: \[code\]<?xml version="1.0" encoding="UTF-8"?><playlist xmlns="http://xspf.org/ns/0/" version="1"> <title/> <creator/> <trackList> <track> <location>http://geodesic1.streams.audioaddict.com:80/di_chillout3</location> <title>Ulrich Schnauss - Between Us And Them</title> <annotation>Stream Title: Chillout - ambient psy chillout.Content Type:audio/mpegCurrent Listeners: 0Peak Listeners: 0Stream Genre: Electronic Chillout Ambient</annotation> <info>http://www.di.fm</info> </track> </trackList></playlist>\[/code\]Can someone show how to accomplish this task with php script? The example solution would be greatly appreciated.
 
Back
Top