I am working on a project that requires file uploads. I want to make sure it's secure and that only PDF files are being uploaded. I am already checking file extension but i want to make sure the file really is a pdf file.
What is the best way to check the mime type in php? I am using PHP 5.2.5 and can't seem to get fileinfo or mime_content_type() working.
for fileinfo i keep getting this:
Warning: finfo_open() [function.finfo-open]: Failed to load magic database
at '(null)'. in [snipped filename] on line 35