I am trying to make a PHP page load an image and display, as if it were an image file. Here's what I tried to do:
header("Content-type: image/png");
echo base64_encode(file_get_contents($ad->location));
But this doesn't seems to work. How should this be done?
Thank you.