Re: how to detect type of image
| From: | tedd | Date: | Sat, 28 Apr 2007 11:54:23 +0000 |
| Subject: | Re: how to detect type of image | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254054@lists.php.net to get a copy of this message | ||
At 2:10 AM +0200 4/28/07, Tim wrote:
On 21.04.2007 12:45, Alain Roger wrote:Tim: It should, but instead try this: $image_size = getimagesize($filename); echo $image_size['mime']; Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.comHi, In my web application, end user is able to load images (png, jpeg, gif,..) into database. I would like to know how can i detect automatically the type of image (pnd, jpeg,...) ? i do not want to check the extension because this is easily faked... just by renaming it. Does it exist a technique for that ? thanks a lot,Hi, unfortunately mime_content_type() does not work for me.