On Mon, 2004-01-12 at 19:33, Richard Davey wrote:

The filename isn't always the best way to tell. I mean I could rename
an mp3 to jpg and you'd think it was a jpg and happily insert it into
your database. Instead it's probably better to test the integrity of
the image itself.
    I didn't even think about that.  Thank you :)

If it's available on your web host (and it probably is) use this
function:

getimagesize()

Specifically, look at the 2nd index in the returned array (the image
type).

    I was about the get the size of the image anyway so this way I can kill two birds with one stone.  Thanks for the help Richard !

-Peter

-- 
perl -e 'print pack("H*", "70766572746573406E79632E72722E636F6D0A")'

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to