$dir = "mpegs/timeclock/";

// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
   if ($dh = opendir($dir)) {
       while (($file = readdir($dh)) !== false) {
		  if ($file != "." && $file != "..") 
			{
// 				add this found file to an array
       			$filetlist [$file] = filemtime ($dir.'/'.$file);
			}
       }
       closedir($dh);
   }

// sort the array 
  asort($filetlist);

// loop though the array of found files
  while (list ($key, $val) = each ($filetlist))
  {
//   and present a link to each of those files
     echo "<A HREF=http:/$dir$key>" . " " . 
	 		date ("F d Y H:i:s.", $val) . 
			"</a><br>\n";
   }  
}