ok, I have one more thing left for you to try and then your at the limit of what I know...
function file_ext($key) {
$key=strtolower(substr(strrchr($key, "."), 1));
$key=str_replace("jpeg", "jpg", $key);
$key=str_replace("JPG", "jpg", $key);
$key=str_replace("GIF", "gif", $key);
return($key);
}
$types = array('.swf','.jpg','.png');
$file = '$_FILES';
if ((!in_array(file_ext($file)),$types)) {
echo "sorry, the files of type '$file' are not supported";
}
I use this on a photo album I have, I'm reading out of a directory but it should be basicly the same.