Reputation: 2729
I making a simple script to add a watermark image to all image files in directory.
So, I have .htaccess:
AddHandler watermarked .jpg
AddHandler watermarked .jpeg
AddHandler watermarked .gif
AddHandler watermarked .png
Action watermarked /spimg/vitowatermark.php
So, now on each image request from this directory, vitowatermark.php is working.
How can I get source image file, user requested from my PHP script, to put watermark on it and generate answer?
Thanks.
Upvotes: 1
Views: 424
Reputation: 2729
Cool, I find answer to this question myself.
$filename = $_SERVER["PATH_TRANSLATED"];
Upvotes: 1