는 (의 말을하자 사진을 업로드 할 때) 이전에 생성 된 것 덜 높은 (그리고 워터 마크를 숨길 수) 이미지를 통해 상자를 만드는 것이 었습니다.
이렇게하면 CSS가 그림 아래의 흰색 상자를 숨기고 다른 사람이 "다른 이름으로 저장"을 사용하면 해당 상자가 나타납니다. ressource는 서버에서 사용되지 않습니다.
다음은 내가 개발 한 브라우저 헤더를 기반으로 한 솔루션입니다. "다른 이름으로 저장"을 사용하지 말고 직접 액세스 그림과 src = ""에 대한 작업
<?php
#...
# Require PHP to work as a module in apache
$SentHeaders = apache_request_headers();
#$Watermark = strpos($SentHeaders['Accept'], 'text');
$Watermark = preg_match_all('/text/', $SentHeaders['Accept'], $matches);
# Set the header
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
# HHeader required
($Image->ContentType) ? header('Content-Type: '.$Image->ContentType) : header('Location: /404');
# Accès direct/save as
if($Watermark){
# Direct Image Access
#...
} else {
# Image included in src=""
#...
}
#...
?>
누구나 "다른 이름으로 저장"명령을 수행하면 누구나 워터 마크를 발생시키는 방법을 알 수 있습니다. –
http://9gag.com/으로 이동하여 이미지를 저장하려고하면 워터 마크가 추가됩니다. 설명 할 수 있니? –
@ DavidBélanger 그들은 단지 음의 여백으로 잘라냅니다. '워터 마크'가 이미 이미지에 있습니다. – Gumbo