PHP function detecting whether a jpg file is valid?
Moderator: General Moderators
PHP function detecting whether a jpg file is valid?
Is there any function in PHP that can detect whether a jpg picture is valid or not?
Re: PHP function detecting whether a jpg file is valid?
If all you care is that it looks valid then getimagesize tell you that. If you actually want to validate the entire thing then you'll have to load it into memory with something like imagecreatefromjpg (and don't forget to unload it).