[PHP] Re: Is this really a pdf?

2006-08-07 Thread Barry
Sjef schrieb: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? Thanxs, Sjef this might help http://de3.php.net/manual/en/function.mime-content-type.php -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o

[PHP] Re: Is this really a pdf?

2006-08-07 Thread Colin Guthrie
Sjef wrote: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? If you have a suitible mime.magic file, and your PHP has the functionality built into it, you could try the mime_content_type() function.

Re: [PHP] Re: Is this really a pdf?

2006-08-07 Thread Rory Browne
On 8/7/06, Colin Guthrie [EMAIL PROTECTED] wrote: Sjef wrote: Is it possible to recognize if a file for upload really is a pdf (like the function getimagesize retuns the file type of the image)? If you have a suitible mime.magic file, and your PHP has the functionality built into it, you

[PHP] Re: Is this really a pdf?

2006-08-07 Thread Colin Guthrie
Rory Browne wrote: http://uk.php.net/manual/en/function.mime-content-type.php Is this to protect against somebody trying to pass an mp3 off as a PDF, or to stop people mistakenly uploading PDF's. If it's the latter, then mime functions are probably okay. If the former, then you may want