Kevin... YOU RULE!!!!!!!!!!!!!!!!!!!

A million billion Humble thanks!

So simple, yet was such a pain to get past. I was racking my brain on that one!
Man, if I could just buy you a beer online, I would.

- NorthBayShane

BUT...Does this mean I will need a separate PHP page for every graphic script?
You would think there would be a way to call it from a function.

(Thinking out loud now...)
But I suppose I could send a variable along with my <img src="getimage.php"> tag like

<img src="getimage.php?id=123">

and then when the PHP code in getimage.php compares the variable passed to it's 
library of code snippets it would spit back the necessary image each time.

Is there a better way?

-----Original Message-----
From: Kevin Stone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 1:34 PM
Subject: Re: [PHP] GD Questions: Please help.

Shane, absolutely you can mix HTML and dynamically generated images.  You'll
actually call the image in passively via an <img> tag like this...

<img src="getimage.php">

getimage.php will echo the appropriate image header (Content-type: image/png
or whatever) plus your image grabbing/generating code which you will simply
output to the browser.  Deceptively easy, yes?  :)

Hope this helps.

----- Original Message -----
From: "Shane" <[EMAIL PROTECTED]>
Sent: Thursday, June 13, 2002 2:21 PM
Subject: [PHP] GD Questions: Please help.

> Greetings fellow PHPers.
> I am learning basic GD functionality and I have a few YES/NO questions to
> This should only take a few seconds of your time. PLEASE HELP!
> So far I have seen several tutorials on creating graphics on the fly.
> In each example the either send the image (by itself) to a browser (using
the HEADER line) or they save it to a directory.
> Can I send an image to a browser along with other HTML and PHP
information, or does my image have to be on it's own.
> If I want to send my image to a browser with other HTML do I have to save
it to a file first?
> Does my directory that I am writing to have to have "write permission" set
to TRUE for me to create an image file? and if it is NOT, will I get an
error something like...
> Warning: imagejpeg: unable to open '/images/test.jpg' for writing!
> Can anyone show me a chunk of sample code or function that shows how I can
embed my images created on the fly into my normal HTML files.
> As always, thanks in advance my friends.
> - NorthBayShane
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to