I have some images in bin, I want to check the header to check the format (jpg, png, etc)
I don\'t want to use temp files! I have a solution using TEMP FILES.
Why not just check the file entension? :)
An Alternative
if(exif_imagetype($filepath) == IMAGETYPE_JPEG){ echo 'This is a JPEG image'; }