I\'m implementing a user-based image uploading tool for my website. The system should allow any users to upload JPEG and PNG files only. I\'m, of course, worried about se
Concerning No. 2, I read on php.net (documentation of the function getimagesize() ):
Do not use getimagesize() to check that a given file is a valid image. Use a purpose-built solution such as the Fileinfo extension instead.