开发者

Image use tracking possible?

I have some images on my site that I made, just some .gif and .jpg.

Is it possible to find out if someone is stealing my images and using them on their own website in <img src="">?

How can I find the gu开发者_如何转开发y’s website that is stealing my images?


I'd suggest to put something like not direct path to the image but src="/ImageProvider.php?imgId=12345". In that page/control you'll be able to revise, which host requested the image.


You can use the Referer: header for that. It's not the most reliable method, since only a percentage of browsers actually sends it. But it's sufficient for detection. It would normally be empty or contain your websites URL at best. As soon as another domain is referenced, you can block and log it.

A common method is using mod_rewrite for such purposes in the image directory.

RewriteCond %{HTTP_REFERER}  ^(.+)$
RewriteCond %{HTTP_REFERER}  !^http://www.yourdomain.com/  [NC]
RewriteRule (.+)   /block_and_log.php?img=$1&domain=%1     [L]


You can check the referrer information in the HTTP request. You can disable such request with mod_rewrite:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !yoursite.com [NC]
RewriteRule .* /accesspage.html [L]

But if you want to track who is using it then you will have to use an intermediate script to parse the referrer information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜