load(getenv('USER_DATA_PATH').'base.xml'); $vi = $dom->getElementById($id); $files = $vi->getElementsByTagName("file"); if ($files->length > 0) foreach ($files as $file) { if ($file->getAttribute("stop") < $st) { continue; } if ($file->getAttribute("start") >= $st + $dt){ break; } //error_log($file->getAttribute("name"),3,'mylog'); echo $file->getAttribute("name").","; } exit(); ?>