<?php $winamp = new COM('WinampCOM.Winamp'); if ($winamp->GetVersionString() == 0) { echo "error: unable to connect to winamp.\n"; // to get extended error information, uncomment the following line //echo $winamp->GetErrorLog() . "\n"; exit; } $pl = $winamp->GetPlaylist(); foreach ($pl as $track) { echo "$track\n"; } ?>