<style type="text/css"> A, A:visited { color: blue; } </style> </head> <body> BLK1; require_once 'mpd-class/mpd.class.php'; $mpd = new mpd($host, $port, $password); $pl = $mpd->GetDir(); if (isset($_GET['setTo'])) { if (in_array($_GET['setTo'], $pl['playlist'])) { //test for illegit data $mpd->PLLoad($_GET['setTo']); } elseif (isset($_GET['clear'])) { $mpd->PLClear(); } elseif (isset($_GET['del'])) { //mpd.class tests for integer $mpd->PLRemove($_GET['del']); } elseif (isset($_GET['play'])) { //mpd.class tests for integer $mpd->SkipTo($_GET['play']); $mpd->Play(); } } $me = basename($_SERVER['PHP_SELF']); $rnd = substr(md5(rand()), 0, 8); // having trouble with refreshes. this should convince the browser that everything's unique print "<p><a href=\"playlist.php?{$rnd}\" accesskey=\"*\">*. Refresh</a> | ";