[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache2 and php rendering

On Thu, Sep 08, 2005 at 06:01:07PM -0400, Bernd Prager wrote:
> I'm trying to use some Flickr images on my website and wrote a php
> script that gets me the link.
> Within the html page I want to use now a tag like <img
> src="/php/getImage.php" /> for the image.
> If I call the script directly in the browser with
> "http://myserver/php/getImage.php"; I get the desired image.
> But when I try to include the img tag above in the /index.html file
> above it doesn't get rendered.
> I'm using apache2 and libapache2-mod-php4.
> Has anybody done this? What do I miss?

What exactly does the script deliver to the browser?
To be used within <img src="..."/>, the script would have to return
the image data itself, i.e. some stream of MIME type image/jpeg, for
example.  Returning a link/URL to the image won't work here, as the
browser does not resolve indirections in this context.

You could dynamically create the HTML with the image link properly
interpolated in between the quotes of src="...". Or use Javascript...


Reply to: