Is it possible to check the content of an uploaded file to make sure that it doesn't contain anything that could harm the server (files etc.).
I've tried merging to files into a single image file, making it contain some php code. I then tried to upload it with a simple upload PHP script and trying to check the content of it, but without the result I was looking for.
So if we receive the following file from the client:
$_FILES["profilePicture"]
How can I make sure that this is a valid image?
Any help will be greatly appreciated