Am 14 Feb 2006 11:01 meinte Chuck Guzis:
On 2/14/2006 at 1:05 PM 'Computer Collector
Newsletter' wrote:
>>>> have it give different images if the Referrer for the request is his
>site.
>How do I do that?
It would be good to learn a little Javascript. The
"document.referrer"
property will tell you where your page was linked from. With that
information, you can do a little more JS hocus-pocus and do whatever to you
want to folks who have been referred from the guy's site.
In point of fact, JS is useful for making things hard
for others to copy.
Since it's all out in the open, anyone can unravel your JS and get what
they want, but it can be a bunch of trouble and that's usually enough of a
deterrent.
You could also do the same thing with a Java applet or
a server-side
script.
Perfect solution ... except that I usualy choos the simple aproach:
If someone uses my pics from MY server (and sucks bandwith) I just
change the URL - a simple search and replace thru all my pages
keeps my pages intact - and then I place a nice file at the old
location, informing all visitors (of the other site) what happened,
and how much I enjoyed his theft of bandwith.
No Java, no complicated programms.
If you realy want to go for the referer aproach, you should keep in
mind that this will invalidate not only all reachbots (so, noone will
find you page by searching for a picture of a specific machine), but
also ban users from seeing picture wo either have unusual browser,
or who are concerned about their privacy, and therefore have configured
their browser not to send referer-header.
Also, before using Java and bloating the pages, a simple regexp
in the server configuration for the picture files can do the same
trick.
Gruss
H.
--
VCF Europa 7.0 am 29/30.April und 01.Mai 2006 in Muenchen
http://www.vcfe.org/