.htaccess Wrappers with PHP
(Page 6 out of 6)If you think about it, a watermark script like this could also be used for a number of things. For example, if you decide to run an image hosting service like AuctionWatch does for eBay users, you could watermark your site's URL to the bottom. Your users get a free service and everyone else sees a possible place to get free image hosting, there's some nice viral promotion right there.
You could also adapt the script to check the HTTP referer (in the variable $_SERVER["HTTP_REFERER"]) to see if the image was called offsite. If it was, the script would put the watermark on there but if you called it from a page on your own site, the image would be shown without one.
Even I have put wrappers to good use. Last year I wrote a product for Teresa King called Codewarden, which uses htaccess wrappers to display all the files of a directory in an encoded JavaScript string in an effort to hide HTML source.