phphttp-headersfile-get-contents

Show image using file_get_contents


how can I display an image retrieved using file_get_contents in php?

Do i need to modify the headers and just echo it or something?

Thanks!


Solution

  • Do i need to modify the headers and just echo it or something?

    exactly.

    Send a header("content-type: image/your_image_type"); and the data afterwards.