Is there a way to make sure a received file is an image in
Testing for the extension doesn't sound very secure to me as you could upload a
script and change its extension to whatever you want.
I've tried to use
getimagesize too, but there might be something more suited for that particular problem.