Sep
16
Posted on 16-09-2009
Filed Under (Security) by admin

How can I protect a logo (jpg format) from being downloaded and used in a mailing list by spammers without implementing disable right click functionality? Overloads our server and bandwidth.
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Webnews
  • MisterWong
  • Y!GG
(1) Comment    Read More   

Comments

pithen on 16 September, 2009 at 2:58 pm #

First off (and it seems like you already understand this from the wording of your post), it is impossible to prevent somebody from downloading the image from your server and then uploading it to their own such that they could use the image. If they can see it on your site, they can get it.

That being said, it is possible to prevent them from from linking to the copy which resides on your site. There are a couple of ways to do this.

The best way to do it (IMHO) is using your web servers configuration files (.htaccess) if your server is Apache. Of course this depends on your hosting provider allowing you to access/modify these files. If not, you can also accomplish the same thing using a Perl or PHP script (or some other server side scripting language). In your website, you actually refer to a script which loads the image, and not the image itself. The script determines whether or not it should allow the image to be loaded, and then loads it if necessary.

Both methods make this determination based on the referrer specified in the HTTP headers. If the request for an image came from a link on your own page, it should allow the image to be loaded, otherwise it should either do nothing, or display an image stating that the link was blocked.

For info on setting these up, do a search on, say, “prevent image linking”, or check out this sites I just found:

This discusses using the htaccess method, but there is also a link to another article in which a PHP script is discussed.


Post a Comment
Name:
Email:
Website:
Comments: