in reply to anti leech CGI

If you are just trying to keep people from linking directly to your images, then there is a great module for Apache called AccessRefer. This uses the referrer to validate where the image is being loaded from. This has the added bonus of being able to be configured for your virtual hosts, thus giving each of your sites their own "access list".

As with anything coming from the user, REFER can be forged, but for the most part, this is a pretty good way of doing it.