View Single Post
Old 11-20-2007, 07:56 PM  
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
If you want to make it the most extendable, you'll make a little PHP script to do it, like I did with this:



Then, you can pass your params to it which you wish to have written.

mod_rewrite would be a good candidate:

Code:
RewriteCond ^images/macros/custom/(.*)\.jpg$
ReWriteRule /path/to/gd/script?text=$1 [L]
If you want to do it really slick, you'll do an md5() of the text, and have it have it imagejpg() that out to a file, and if that file exists, fpassthru() or readfile() that file instead of the overhead of recreating it.

.. and it'll work to create new ones, too.

This is what we call creative over-engineering.
__________________

Last edited by GrouchyAdmin; 11-20-2007 at 07:57 PM..
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote