Jump to content

Image Capture and Display


iwato

Recommended Posts

BACKGROUND:  With a mixture of melancholy reluctance and what-else-to-do excitement I have returned to Matomo and managed to extract what appears to be an image.  In effect, I am echoing a cUR result set that appears as follows:

�PNG  IHDR "�E! pHYs���+�IDATx���}�E����ٙ�K6�n ل���DP�FT�_��r���;ėS<���;.���E��D�<5'QP ��o �I��IV6�dC�n6��f6;3}4M���LW������L�Tw��2����J�u]@�L� H�b,�X��#`(F�����v�B۷\�!#`%OWWרo���+�� ...

My intuition -- I am sorry, if I can offer little more at this point -- tells me that I could read the contents of this file with the simple addition of a document heading.  If so, what might this heading be. If not, what would you suggest?

Please advise.

Roddy

Link to comment
Share on other sites

If that is the only output of your script then you can make the browser interpret it as an image by sending a content-type header:

header('Content-type: image/png');
echo $image_content;

If you try to print anything else, like HTML or even just spaces and line breaks, then the image will appear corrupted in the browser.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...