Trying to upload images.
So how can I be sure its an image 100% and how I can allow only jpg, jpeg images ?
image upload
Moderator: General Moderators
you could use something like getimagesize()
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
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
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