Re: File Upload Name Mangling Question
| From: | Peter Vertes | Date: | Tue, 13 Jan 2004 00:45:07 +0000 |
| Subject: | Re: File Upload Name Mangling Question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174396@lists.php.net to get a copy of this message | ||
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: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc