"Erwin Moller"
<si******************************************@spam yourself.com> wrote in
message news:3f***********************@news.xs4all.nl...
me wrote:
Hey all,
well i am also a newbie :)
i saw this on many sites:
<img src="somephp.php?blabla" width="100">
how can i make that to?
i want to reffer to a php file that returns or prints a jpg image and in
the <img src=must be a php url>
Best regards M
Hi,
You should somephp.php?blabla return an image, including the right headers
for MIME-TYPE and such.
Should work as you described above.
The trouble will be generating a script that does that. You will have to
do some more research on imagelibs in PHP.
Good luck,
Erwin Moller
Thanks,
i did some testing with this code:
header("Contet-type: image/jpeg");
$theURL="image.jpg";
if(!($fp=fopen($theURL,"rb")))
{
print("Could not open the URL.");
exit;
}
$contents=fread($fp,1000000);
print($contents);
fclose($fp);
But must i always set the header("Contet-type: image/jpeg") before the code
begins or can i make first a musql query orso to get the rigth image and
then print the header("Contet-type: image/jpeg");?