June 19th, 2000, 03:23 AM
can any body help me how can i build a php file which can be called with <img src= > tag . this PHP file may or may not produce any picture....
June 19th, 2000, 03:28 AM
You can just enter the URL to the php file but the return value can not be shown in the browser, not even when it is a picture. So you need to make the picture a 1X1 pixel-picture so it does not show.
If you want a new picture that you can't hardcode in advance to appear you have to use a frame.
Boradoli Web Design
June 20th, 2000, 11:49 PM
I would think it would have to return an image, otherwise you'll get that broken link picture. if you make it 1x1 pixels, that would kind of hide it. I'm curious why you would want to call a php file from the src tag of an img? can you share anymore info?
to call the file, use
From the php manual of what button.php3 could look like:
3 Header("Content-type: image/gif");
4 $string=implode($argv," ");
5 $im = imagecreatefromgif("images/button1.gif");
6 $orange = ImageColorAllocate($im, 220, 210, 60);
7 $px = (imagesx($im)-7.5*strlen($string))/2;
8 ImageString ($im,3,$px,9,$string,$orange);
June 21st, 2000, 12:16 AM
I would think it would have to return an image, otherwise you'll get that broken link picture.
yea,It should return an image...
"The fear of the LORD is the beginning of knowledge..."