Milan Reznicek wrote:
There's probably a better way of doing this (and I intend to use snowdrop rather than wrjgpcom eventually) but here's what I have so far, which seems to work!!Look into mod_rewrite's manual -----Original Message----- From: users-return-51123-reznicek=espace.cz@xxxxxxxxxxxxxxxx [mailto:users-return-51123-reznicek=espace.cz@xxxxxxxxxxxxxxxx] On Behalf Of zcat Sent: Saturday, April 02, 2005 8:32 AM To: users@xxxxxxxxxxxxxxxx Subject: [users@httpd] watermarking images on the flyI have a directory full of jpeg's. I'd like to intercept any request in this directory (eg for /images/foo.jpg) and instead have apache run "/images/watermark.php" which will return the appropriate image headers followed by watermarked jpeg data..I've got a fair idea what to put in my script, but what do I put in .htaccess to make this work?
Comments? .htaccess: ReWriteEngine On ReWriteRule \.jpg watermark.php watermark.php <?php header("Content-type: image/jpg"); $ip = $_SERVER['REMOTE_ADDR']; $img = $_SERVER['REQUEST_URI'];passthru("wrjpgcom -comment \"downloaded from http://zcat.wired.net.nz/ by $i
?> -- On June 1, 2001, Steve Ballmer, CEO of Microsoft, told the Chicago Sun-Times: "Linux is cancer." Unsurprisingly that's incorrect; LINUX was released on August 25th 1991 and is therefore a Virgo. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx