here's your code right back at you with a quick change...
<?php
$default_dir = "./images";
//set this to whatever you DON'T want...
$exclude = 'family';
if(!($dp = opendir($default_dir))){ die("Cannot open $default_dir");
}
while($file = readdir($dp)) {
//and here's your big fixaroo...
if (!eregi("($exclude|.|..)",$file)) {
$fnames[] = $file;
}
}
closedir($dp);
?>