Create file from JFIF data
问题 I have a dump of our LDAP database, and i'm attempting to extract all images from it using PHP. The images seem to be stored in JFIF format (at least, according to http://tools.ietf.org/html/rfc2798#page-5). However, i can't figure out how to create a JPEG file from this; I attempted file_put_contents to dump everything in name.jpeg, imagecreatefromstring 's output to imagejpeg and some variations on those. However, either I'm not using them correctly, or I'm just attempting this wrong