I'm running PHP 5.0.4 on Windows Server 2003.
I'm currently working on a real estate website that dynamically pulls information from a RETS server. This server holds data about homes for sale on the MLS. Here is the problem:
I'm trying to pull the images of a house from the server. I get all of the header information and then the binary data stream (I think it's bindary) as seen below. I am trying to display this image:
[CODE]HTTP/1.1 200 OK
Date: Wed, 21 Sep 2005 01:05:24 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET (03)
X-AspNet-Version: 1.1.4322
MIME-Version: 1.0
Object-ID: 1
Content-Description:
Content-Length: 28211
RETS-Version: RETS/1.5
Cache-Control: private
Content-Type: image/jpeg
We have a PHP function that strips off the header information from the RETS server (that you now see above) so that all that remains is the binary data stream. Also, I am setting the headers on this particular page to content-type = image\jpeg and content-length = strlen(binarystream). I then reference this PHP page from the page that I am wanting to display the image on by <img src="displayimage.php">. From everything Ive seen, this should work however, all we get is a broken image link. Is there anything we should be or should not be doing to the binary data stream in order to display this data as an image?Code:JFIFKKC $.' ",#(7),01444'9=82<.342C 2!!22222222222222222222222222222222222222222222222222," ĵ}!1AQa"q2#BR$3br %&'()*456789& #58;CDEFGHIJSTUVWXYZcdefghijstuvwxyz ĵw!1AQaq"2B #3Rbr $4%&'()*56789& #58;CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?"p@:JHG*Q /)CA J((]"~B]"F))n>|7EE.(&?N})1K>/(I?Fh)> ϰ?!E~B4qA Ky..%Hany=q^<e&{5ڄ&j>(ҽwWb3տ⸍_WP M;(~Mh껕pfQ(노5f%%G&=+H-<I *mIGFoc4;L ?n ;c>pWA۸A@<Gkڋ=PD8ogEj`}(}!\uqik>Kz^*zi= NA 7A J) 6PA 7A m~B~B>d~BE. (plus many more characters...)
Thanks for the help...

Reply With Quote
