I'm doing a file upload script that only allows jpgs.
The script that I'm using to check is
$size = getimagesize($filename);
$size['mime'];
That works in most cases. However, if I have a "gif" file and I renamed the extension to "jpg", it tricks the system since the mime type for that file shows up as jpg.
How can I prevent that?
So jpg and png are allowed Gif is disallowed