Welcome Guest, Not a member yet? Register   Sign In
Serving Image from controller (warning newbie alert)
#3

[eluser]MattEth[/eluser]
[quote author="graf" date="1251778068"]did you try to echo out the file_get_contents after you sent the header type?

This should work ;-]

Code:
function serve_images {
  $imageString = file_get_contents('http://blah.com/myimage.gif');
  header("Content-Type: image/gif");
  echo $imageString;
}
[/quote]

Thanks for the reply. Yes, I did try this, however, the image is still broken (ie. the browser things the image is not valid). Anyone else have any ideas? Maybe there is a better way to do what I'm trying to do?

Thanks! Smile


Messages In This Thread
Serving Image from controller (warning newbie alert) - by El Forum - 08-31-2009, 04:02 PM
Serving Image from controller (warning newbie alert) - by El Forum - 08-31-2009, 05:07 PM
Serving Image from controller (warning newbie alert) - by El Forum - 08-31-2009, 05:20 PM
Serving Image from controller (warning newbie alert) - by El Forum - 08-31-2009, 06:00 PM
Serving Image from controller (warning newbie alert) - by El Forum - 08-31-2009, 06:09 PM
Serving Image from controller (warning newbie alert) - by El Forum - 08-31-2009, 11:38 PM
Serving Image from controller (warning newbie alert) - by El Forum - 09-01-2009, 01:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB