# \[PHP\] checking swf files

**URL:** <https://forum.kirupa.com/t/php-checking-swf-files/224184>\
**Category:** programming\
**Created:** [April 29, 2007, 6:07pm UTC](https://forum.kirupa.com/t/php-checking-swf-files/224184 "2007-04-29T18:07:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [April 29, 2007, 6:07pm UTC](https://forum.kirupa.com/t/php-checking-swf-files/224184/1 "2007-04-29T18:07:52Z")

</div>

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?

```php

// 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>';

```
