Readfile equivalent for binary data?

You just set the content-type header and output the readfile to the browser. What I do is create a new php file, like "showimage. Php", that accepts an ID or some such to know what image to display.

Then I use it in a browser page: In showimage. Php, something like:? Php header('Content-type: image/png'); echo readfile('/var/images/' .

$_GET'id' . '. Png'); // or // echo $object->body;?

That would read a file from the local system and output it as an image. Off the top of my head, so I might have messed up that code!

You just set the content-type header and output the readfile to the browser. What I do is create a new php file, like "showimage. Php", that accepts an ID or some such to know what image to display.

Then I use it in a browser page: . In showimage. Php, something like: body;?

> That would read a file from the local system and output it as an image. Off the top of my head, so I might have messed up that code!

Header('Content: image/jpeg'); echo $object->body; Should work fine (for JPEGs), you need know what filetype is in question and then send appropriate content headers.

It still displays the binary in the browser. – user983223 Oct 19 at 0:47 define the binary... if that's not image, you should see white page /image. – webarto Oct 19 at 0:49 the source code...this is the first line ÿØÿálÔExifMM*HTCbjr(‡izRPC36100HHˆ';0220‘’ , 0100 À 42011:04:19 21:21:382011:04:19 21:21:38ìdR980100 ¨(°kHHÿØÿÛ„ $.' – user983223 Oct 19 at 0:55 You could paste entire code on pastebin.

Com or upload as text file... I see it is JPEG. – webarto Oct 19 at 0:56 the only thing I can think of is it is hosted on Amazon. I can add metadata to the file (content type, content disposition, etc).

I have tried adding content disposition inline in the metadata but that didn't change the outcome. – user983223 Oct 19 at 1:06.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send