getFileNames.php
616 Bytes
<?php
$id = $argv[1];
$st = (int)$argv[2];
$dt = (int)$argv[3];
$dom = new DomDocument("1.0");
$dom->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();
?>