Gossamer Forum
Home : Products : Links 2.0 : Customization :

how to protect pictures

Quote Reply
how to protect pictures
Hi,
I need to know if somebody has an idea to protect my pictures. It is not about copying or borrowing, because they are free to download, but some websites are using my pictures into their pages, but they did not copy the pictures from my server to their server, they just link to my pictures using my disk space and my bandwidth and they do like my pictures are their own files to make money in advertising, so how to do something to protect my files, I mean is it possible to let the server load my pictures only if they are linked from my domain name.
I hope it is enough clear to understand, because my english is not really good.
Sincerely
Denis

Quote Reply
Re: how to protect pictures In reply to
Why have you posted this in the Links2 Customization Form??

But anyway....

Use a script that cloaks the URL and checks the referer.

http://www.domain.com/cgi-bin/cloak.cgi?img=foobar.gif

The script will then show the appropriate image but it hides the correct URL and you can get it to check the referer so if someone tries to put that URL in their page they will get an error.

Eg......

use CGI qw(:standard);

$q = new CGI;

my $secret_url = "http://www.domain.com/img/dir";
my $ref = $ENV{'HTTP_REFERER'};
my $img = $q->param('img');

@accepted = qw( http://www.domain.com );

foreach (@accepted) {
if ($_ ne $ref) {
print header;
print "ERROR";
}
else {
print "Location: $secret_url/$img\n\n";
}
}



Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/