Page 1 of 1

Making sure a .jpg is infact a .jpg

Posted: Fri Jul 23, 2004 3:06 pm
by RecoilUK
Hi guys

Say you want to allow users to upload a .jpg onto your server.

Is there a way of automatically inspecting the file, firstly to make sure sure it is indeed a picture, secondly to make certain its of a particular size(x,y coordinates, not filesize) and to make sure its not a virus (if they can contain viruses, which I dont think they can).

Look forward to your responses.

Thanks guys

Posted: Fri Jul 23, 2004 3:19 pm
by kettle_drum
Use [php_man]getimagesize[/php_man]();


feyd | made function name a link ;)