Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A PHP script to show current QTSS song on the web Internet
Here is a script that will display the currently playing track info from QT SS on a web page using php.

This was basically written by vonleigh with help from nosaj56 in the forums - thanks guys!

// Define path to playlist.current
// Change to match your playlist name and path
$path = "/path/to/QTSS/playlist.current";

// Read playlist.current into $file
$file = fopen($path, "r");

// Read the contents of $file into $content
$content = fread ($file, filesize($path));

// Separate into parts and put in $info array
$info = explode("/",$content);

// Delete .mp3
$song = substr($info[5], 0, -4);

// Make sure to close after you open

// Print the information
echo "<br> Track: $song <br>";
echo "<br> Album: $info[4] <br>";
echo "<br> Artist: $info[3] <br>";

You might need to change the permisions of the playlist directory with chmod 777 to get it to work.
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)

A PHP script to show current QTSS song on the web | 2 comments | Create New Account
Click here to return to the 'A PHP script to show current QTSS song on the web' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: Chris Haynes on Dec 22, '02 05:42:12PM

Thought we decided on chmod 755 because of the security issue?

[ Reply to This | # ]
Authored by: nosaj56 on Dec 23, '02 01:59:27PM
For future reference, the related threads are here and here.

[ Reply to This | # ]