Belgin Fish Belgin Fish - 13 days ago 5
PHP Question

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!

Answer

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.

Comments