Jump to content

Protecting Online Images


ukscotth

Recommended Posts

Hi,

 

I run a site that contains images I dont want people to steal. I know its impossible to stop them but I want to make it as difficult for them as possible.

 

I have seen people posting my sites images url's on various other sites and I thought I could stop them by changing the image filenames every now and again.

 

Anyone have any ideas to how I could do this ? maybe using a cron job or something similar.

 

Also does anyone know any other methods I could use to help stop people stealing my images ?

 

Thanks in advance.

 

Scott

Link to comment
https://forums.phpfreaks.com/topic/188788-protecting-online-images/
Share on other sites

Other than using a watermark, you can also get PHP to actually generate your images for your site..

So on your site you will have <img src="images.php?file=header.png" /> and inside that script you can check the referrer... Its not fool proof but it sure can help..

 

Here is a little example I found

http://safalra.com/programming/php/prevent-hotlinking/

You can stop hotlinking by putting this into a .htaccess file and uploading it to the main document root of your website:

 

RewriteEngine On

RewriteCond %{HTTP_REFERER} !^http://(.+\.)?YOURSITE\.com/ [NC]

RewriteCond %{HTTP_REFERER} !^$

RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/goatse.jpg [L]

[/quote[

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.