I know how to validate an image file that a user sends through a form, but I don’t know how to do that for Flash SWF files. Is there some analogous function similar to the below code? If not, is there at least a way to tell that the file uploaded was indeed a swf?
// retrieve thumbnail facts
if($thumbnail)
{
$att = $_FILES['thumbnail'];
$att_path = $_FILES['thumbnail']['tmp_name'];
list($width, $height, $type, $attr) = getimagesize("$att_path");
if($type != 1)
$errThumbnail[1] = '<font color="red"><b>***</b></font>';
if($width != 200)
$errThumbnail[2] = '<font color="red"><b>***</b></font>';
if($height != 80)
$errThumbnail[3] = '<font color="red"><b>***</b></font>';
if($att_size / 1024 > 10)
$errThumbnail[4] = '<font color="red"><b>***</b></font>';
}
else
$errThumbnail[0] = '<font color="red"><b>***</b></font>';