Extract information from jpeg using PHP

I want to extract variable length information from a jpeg file using PHP, but this exe data is not .

If I open jpeg with a simple text editor, I see that the required information is at the end of the file and is split into \00.

Like this:

\00DATA\00DATA00DATA\00DATA\000\00DATA

Now, if I use PHP file_get_contents()to load a file into a string, the delimiters \00disappear and other characters appear. For example:

ÿëžDATADATADATADATADATA ÿÙ

Can someone please eplain:

  • Why do separators \00disappear?
  • How to get information using PHP?

EDIT

, , , , DATA: https://www.dropbox.com/s/5cwnlh2kadvi6f7/test-img.jpg?dl=0 (, , )

+4
2

. , , .

urlencode(file_get_contents()), \00 %00.

, :

%00DATA%00DATA%00DATA%00DATA%000%00DATA

%00.

, SO , .

+1

$data = exif_read_data("PATH/some.jpg") , - http://php.net/manual/en/function.exif-read-data.php

+1

Source: https://habr.com/ru/post/1620696/


All Articles