This may be the wrong forum, but..

I'm developing an image upload system in PHP4, and want to test that users are sending me images, and not text files etc. I test images after upload using the following:

if ( strstr($userfile_type[$j], "image") ) { do stuff.. }

So far so good. Works fine under IE5 :-) but when I tried it under Netscape 4.7, I got this message:

Ignoring non-image file linuz.gif

This is generated by the "else" part of my PHP, and just shows what the script actually received. Irfanview is a powerful Windows graphics viewer, and I have associated known graphics files with it..

The problem is, I can't realistically expect all my users to alter their browser/Windows setups, so I think I am now forced to open each uploaded file as I process it and check for a signature.

Is this my only option or can someone suggest a better way ??