what webserver do you use? linux or windows?
if you use windows, you can use this:
<?
$dir = "C:\PATH\TO\YOUR\THUMBS\DIRECTORY";
$rpath = eregi_replace('[\]','/',$dir);
$y = $x = 0;
searchDir($dir, $rpath, 0);
function searchDir($dir, $rpath,$y) {
global $x;
$x = 0;
$site = "http://YOUR WEBSITE ADDRESS HERE";
if ($handle = @opendir($dir)) {
while (($file= readdir($handle)) !== false) {
if ((is_dir($dir.'\'.$file)) && (($file != '.') && ($file != '..'))) {
if($x != 0){ echo "<BR>".$x." files<BR>"; }
echo "<BR>".$dir."<BR><BR>";
searchDir($dir.'\'.$file, $rpath,$y);
}
else {
if (preg_match("/..jpg/i",$file)) {
$temp = eregi_replace('[\]', '/', $dir);
$temp = eregi_replace($rpath, '', $temp);
if($y == 5){ echo "<BR>"; $y = 0;}
else { $y++; }
$fullpath = $temp."/".$file;
echo "<img src=\"".$site.$fullpath."\" width=\"100\" height=\"100\">\n";
$x++;
}
}
}
closedir($handle);
}
}
?>
hope that helps... with few modifications, it can be ported to the linux webserver.