Validate an image in PHP -


i'm using gd create jpegs files user uploads.

what best way validate image user has uploaded valid?

by valid mean file not corrupt image gd won't like, extension testing client side can upload jpegs/gifs/pngs.

thanks

you use getimagesize. return false if image not loaded. has support image types.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -