How to know if type of file is the correct

Hi.
I want to know if file['type'] of a csv file.
But if somebody change the file extension, for example: filename.jpg is changed to filename.csv.
The $file['type'] is 'application/vnd.ms-excel' like a real csv file.
How to restricting that?

from PHP http://ift.tt/25bDuIG
via IFTTT
Previous
Next Post »
Thanks for your comment