What is the difference between $_FILES["file"]["type"] and end(explode(".", $_FILES["file"]["name"]))
If you want to be sure that an image was uploaded, use getimagesize, that returns 0 for non-images.
You're absolutely correct. The MIME type is provided by the client and you cannot guarantee it is correct. For that matter, so is the file extension. If you need to be completely sure, you need to look at the file contents.