ASPit - Totally ASP JSit - Totally JavaScript
Search PHPit

Use this textbox to search for articles on PHPit. Seperate keywords with a space.

Advertisements

.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.

« Previous: The best thing since bubble wrap



Leave a Reply

About the author
Dennis Pallett is the main contributor to PHPit. He owns several websites, including ASPit and Chill2Music. He is currently still studying.
Article Index
  1. Introduction
  2. Tortilla Wrap
  3. Shrink-Wrap
  4. "Gift Wrapping" Your Output
  5. The best thing since bubble wrap
  6. The Wrap-Up
Bookmark Article
Download Article
PDF
Download this article as a PDF file