Displaying an image via HTTP get in the client

Hello,

Forgive me if I’ve missed something obvious but I tried searching.

I have a PHP script that used the GD library to generate an image based on information in a Notes document. I would like to be able to show this image using on a Notes form.

The PHP script works like a treat when I use a URL like the this one to generate the image;-

http://someserver.com?var1=blah&var2=blah etc

My PHP script returns a .gif with the correct mime type

On my form, I use a computed value and render it with passthru HTML like so;-

“<img="http:\someserver.com?var1=” + var1 + “&var2=” + var2 + ""/>

Again that seems to compute correctly. However, the image is never displayed in the client. It seems to fetch it looking at the HTTP transaction but it can’t seem to display it.

Anything I’m missing?

Cheers!

Chris

Subject: Displaying an image via HTTP get in the client

Given the code you have posted, its missing the src= attribute and the slashes should be forward types, ie the correct tag should be:

<img src="http://someserver.com?var1=, etc, etc">

Also, I assume you have escaped or url encoded the var contents and marked it up as pass-thru HTML?

It should then work, as a ordinary web image!

Subject: RE: Displaying an image via HTTP get in the client

Ooops yes, you’re right but sadly that’s what I had. I’d omitted the src as I’d typed out an example rather than cut and paste. Here’s a correct example;-

“<img src="http://someserver.com?var1=” + var1 + “&var2=” + var2 + “&var3=” + var3 + “" height=440 width=760/>”

The computed value works fine. I’ve got a test link using the same formula underneath which when clicked on, happily opens up the generated image in my browser. I’ve amended the PHP script to write a temp copy of the image to disk as well which checks out.

I’ve tried a variety of image formats, my target is PNG but the preview can be anything, .gif .jpeg ; whatever the GD library can spit out.

One funny thing I’ve just noticed whilst messing about is the error “Invalid GIF Format” and “Error decoding JPEG” respectively.

Thing is, if I switch the location document to the Notes browser and type in the URL manually it works!