This blog has been retired. My new home is at http://josephscott.org/.
0

PHP, But Only When Needed

Posted on July 10th, 2006 /
Tags: , ,

There are times when you only want to have your PHP scripts run when certain conditions have (or haven’t) been met. This technique is often used for caching. A real life example of this is discussed in Serving rendered images at the speed of light. The gist of the story is that a PHP script is used to generate thumbnails of images, but it only needs to be called when a thumbnail doesn’t already exist.

The described solution involved making use of Apache’s mod_rewrite, so this isn’t a purely PHP solution. If you aren’t already familiar with mod_rewrite that is okay (I’ve used and it is still quite confusing at times), the author covers each step one at a time.

No Responses to “PHP, But Only When Needed”

Leave a Reply

Ads