Actually a question from the cap.

1) Is it possible to impose water on the downloaded image (Pcm -> save as). If so, tell me how?

2) How to impose a watermark on the image if it is on another site. That is, on its website (say localhost.com) it is without a watermark, but if you click copy an image or copy a link to an image and paste (say in a message on vk.com) then a watermark appears on this image.

You just tell me how to implement it if it is possible, and I can write the code.

  • Watermark is superimposed on the image and becomes part of it, that is, 1 + 1 = 1. If you want to keep one, and on the left site to give another, then there should be a special link that will receive the requested file, overlay the watermark and give the whole image. - DaemonHK

1 answer 1

1st point, unfortunately - no way. There is an option only to prohibit PCM on the site through JS, but it will not provide a ban on receiving pictures

  1. Such an option is possible, for example, if the image is loaded not directly, but through a script, for example

    <img src="http://localhost.com/image.php?name=myimage">

in the root, you need to create an image.php file with approximately the following content

 <?php #файл image.php $host $_SERVER['HTTP_HOST']; $my_site = 'localhost.com'; if($host == $my_site){ //Запрос с нашего хоста //тут ищем изображение с ID которое приходит с $_GET['name'] echo $image; }else{ //Запрос с другого хоста //тут ищем изображение и накладываем на него watermark echo $image; } ?>