On Sunday 08 April 2001 03:57, you wrote:
> I'm wondering if there is any sure way for PHP to determine whether an
> uploaded file is definitely an image file.
>
> I have a script that checks for size and mime type ('image/png' or
> 'image/jpeg'). The script works fine, but I've heard that it is
> possible to add those mime type headers to files that aren't images at
> all, and possibly something mailicious.

Well, if you get some images you won't try to execute them (images off 
bill gates aside :), right? So you don't really have to worry about 
"something malicious".
But if you want to check, just try opening them with one of the image 
extensions (gd, imagemagick, ...)

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

void sleep(){for(long int sheep=0;!asleep();sheep++);}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to