Page 1 of 1
image upload
Posted: Mon Oct 23, 2006 6:22 pm
by amir
Trying to upload images.
So how can I be sure its an image 100% and how I can allow only jpg, jpeg images ?
Posted: Mon Oct 23, 2006 6:29 pm
by Burrito
you could use something like
getimagesize()
Posted: Mon Oct 23, 2006 7:56 pm
by alex.barylski
Check the file signature if GD isn't availble...
Most files (not sure about JPEG, but GIF, BMP) use a fixed file header at the start of the file which basically tells the rendering engine, etc everything it needs to know to fire up the file.
http://www.wotsit.org