dynamic image help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davidcroda
Forum Newbie
Posts: 9
Joined: Wed Nov 08, 2006 10:36 am

dynamic image help

Post by davidcroda »

Hey everyone first off I just want to say hi. I'm new, but I should be posting here much more since I am trying to make some money on elance.com to supplement my income. :)

anyways, I am making a dynamic baby ticker which will count down to pregnancy, birthday, etc. I have all the php code written to generate the image, etc., but I cannot figure out for the life of me how to make it look like an image? It generates the image fine in a browser with the .php extension, but I'd much prefer to be able to generate .gif's for people to link to. I know i've seen dynamic images in peoples avatars, etc., and they are named .gifs, so If someone could just help me figure out how to generate unique images which have an image extension I'd be extremely grateful.

Thanks for your time!

Dave Roda
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

One option would be using mod_rewrite to rewrite the "image" filename into one that calls your script with the appropriate arguments..
davidcroda
Forum Newbie
Posts: 9
Joined: Wed Nov 08, 2006 10:36 am

Post by davidcroda »

ok thanks, i'll google some tutorials =)
davidcroda
Forum Newbie
Posts: 9
Joined: Wed Nov 08, 2006 10:36 am

Post by davidcroda »

im not sure this is exactly what i need. I have seen plenty of dynamic image sites (counters, tickers, etc.) that link to a gif. Is there not a way to mask the script as a gif and give it that extension? Or are all these sites just using the rewrite module.

thanks for all your help
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

davidcroda wrote:...all these sites just using the rewrite module.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Are you creating an image, or are your referencing an image?
davidcroda
Forum Newbie
Posts: 9
Joined: Wed Nov 08, 2006 10:36 am

Post by davidcroda »

well right now i just copy the ticker.php into a unique directory and it sends itself to the browser as an image. I can make it create an image but then the image will not update. nickvd are you saying that IS what they are doing? An example of what im talking about can be found http://lilypie.com/
Post Reply