Re: UNIX file command
| From: | Ilia A. | Date: | Fri, 03 Jan 2003 17:28:41 +0000 |
| Subject: | Re: UNIX file command | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-93095@lists.php.net to get a copy of this message | ||
On January 3, 2003 12:18 pm, Michael Montero wrote:
> Is there a built in function in PHP that mimicks the UNIX file command?
> For instance, I run :
>
> file blah.jpg
>
> and I get this:
>
> blah.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), 72 x 72
For identifying images there is already getimagesize() that will fetch
information about number of commonly used file formats.
There is also a mime_magic extension that uses the same database as the one
used by UNIX file command to identify a variety of files.
Ilia