Reply to Re: Validate an image type using php

Your name:

Reply:


Posted by Lorenzo Thurman on 11/20/06 17:50

Sanders Kaufman wrote:
> 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.)
>
Thanks for the reply. Do you know what I should check for? I know image
types often start with a unique binary header, but I don't know where to
find that info.

[Back to original 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

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