For my user transfer file routine, I only want them to be able to transfer pics or pdf.
I test the extension (jpg, jpeg, gif, png, pdf
Up till now this has worked fine.
BUT someone transfered a aaa.jpg YET it was not a jpg but a php.

Is there some way to test a file for a pic or pdf other than the extension ?