You are here: Re: Validate an image type using php « PHP Programming Language « IT news, forums, messages
Re: Validate an image type using php

Posted by Sanders Kaufman on 11/16/06 20:15

Lorenzo Thurman wrote:
> Does anyone know how to validate a particular image type using PHP? If I
> have a file and I want to ensure that it is a jpeg, how would go about
> it? A sort of is_jpeg or is_gif is what I'm seeking.
> TIA

For each of the image specs (gif, tiff, jpg, etc)
the first few bytes identify what it is. If you can
binary read the first few bytes with PHP, then you
can get that info... and usually a lot of other
stuff (dimensions, pallet, (c), etc.)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация