in reply to Verifying File Type Using Only Modules from basic distribution of Perl

I am trying to find a way to check whether an uploaded image file is what it says it is. ... Thing is the weenie of a sys admin refuses to install any modules no matter how useful ...

Figuring out whether a .JPG is really a JPEG or a .GIF is really a GIF is very easy. All you have to do is open the file, read the first few bytes, and look at the signature. Reverse engineer Image::Size or steal code from it for your script.

  • Comment on Re: Verifying File Type Using Only Modules from basic distribution of Perl