Purl Gurl wrote:
> Oliver Schalch wrote:
> > Purl Gurl wrote:
(snipped)
> > >> I just need to deny _all_ links to my site/aliases (jpgs/gifs/...)
> > >> from _any_ external sites. They are eating all my Bandwith and
> > >> server performance.
> > > How do you know this? Answer my question and you will have
> > > a programmer's answer how to prevent external linking to
> > > graphics or any files. So, how do you know this?
> > With my first posted "solution" - except that MSIE dont want be cool
> > with the referer the website works much faster.
> You did not quite answer my question.
> From a programming point of view, log entries should show
> a GET access to your html page along with GET requests for
> your graphics. What you are looking at in your logs is
> access to your graphics without an associated GET access
> to your html page.
> "if not html access then no graphics"
> There are a number of free scripts (programs) available,
I have written a very simple Perl program to exemplify
how you can protect your graphics or any files. This
program is basic and not designed for simultaneous hits
with it lacking flock facilities; it is very simple for
demonstration only. A lot of simultaneous hits will cause
unpredictable results but is easy to cure with addition
of code to handle these circumstances.
If you would like to see this in action, following these
instructions very carefully. Pay close attention to my
comments about browser caching. If you don't, your browser
will fool you into thinking this does not work. This method
has been successfully tested with MSIE 5.x and 6.x, Mozilla
4.x, 5.x and 7.x with all returning success. There is no
Mozilla 6.x version.
Create a hotlink within an html page at your website using
this graphic link:
<img src="http://www.purlgurl.net/~purlgurl/theft.pl/.gif">
Visit your test html page and observe what graphic is displayed.
Visit this page and observe what graphic is displayed:
<a style='text-decoration: underline;' href="http://www.purlgurl.net/~purlgurl/theft.html" target="_blank">http://www.purlgurl.net/~purlgurl/theft.html</a>
If the same graphic is displayed, you need to dump your
browser cache. You are seeing a cached copy, not the
actual image. Use your browser "reload page" facility
or clear your memory cache and file cache.
An alternative:
Visit here:
<a style='text-decoration: underline;' href="http://www.purlgurl.net/~purlgurl/theft.html" target="_blank">http://www.purlgurl.net/~purlgurl/theft.html</a>
Then visit here:
<a style='text-decoration: underline;' href="http://www.purlgurl.net/~purlgurl/theft.pl/.gif" target="_blank">http://www.purlgurl.net/~purlgurl/theft.pl/.gif</a>
Then visit here:
<a style='text-decoration: underline;' href="http://www.purlgurl.net/~purlgurl/hotlink.html" target="_blank">http://www.purlgurl.net/~purlgurl/hotlink.html</a>
Keep in mind at all times you might be viewing a cached
copy of my graphics, not the actual images. Clear your
cache, reload, or even close and reopen your browser.
I found a "Control R" (reload) works well with MSIE.
Netscape 4.x has a persistent cache and will need a
reload or cache dump. Netscape 7.x handles all of this
very well, no cache errors as expected being the best
written browser available.
This cache problem is actually related to whether or
not your browser obeys "no cache" pragma. Netscape 4.x
is pre-meta and won't. MSIE doesn't do anything right.
Netscape 5.x and 7.x work perfectly.
Use Netscape 7.x if you wish to see all of this happen
in a seamless smooth fashion.
If your bandwidth theft is truly so severe as to load
down your server, look at programs as suggested. You
should know, programs like this actually add to your
server load but will be less than bandwidth problems.
My example is just one of many programming solutions
to this type of problem. Research, read and learn.
Personally, I would not use a program solution, not
even my own programming. The system resource costs
are simply too high, especially in your circumstances
of having dozens and dozens of files to protect.
Best option, most efficient option, is to simply
use a rewrite condition to send an unexpected graphic,
but only for a short period of time, up until those
linking to your graphics understand your message and
stop hot linking.
Blocking ip addresses as you plan, has undesirable side
effects such as blocking those who are not linking to
your graphics. With dynamic ip assignment, chances are
good you will block innocent people. Actually you will
be. You will be blocking those visiting html pages which
contain hotlinks to your site. You will not be blocking
the person who owns the hotlinked html page. If these
pictures are being used in a chatline, you certainly
will be constantly busy trying to block ip addresses.
You are running a membership club, yes? Make it clear
to your members hotlinking to graphics at your site
will result in their membership being terminated.
Yes, there are no easy solutions to hotlinking problems.
Again, best solution is to kick some ass around every
so often. They will get the message.
A good way to kick some ass is to send email to the
owner of a server which shows up in your referrer
log entries. This works very well.
My demonstration pages will be removed in a few days.
After this, you will receive 404 errors. Do it now,
later you will not be able to test this.
Purl Gurl
--
Most Entertaining Android In Existence!
<a style='text-decoration: underline;' href="http://www.purlgurl.net/~callgirl/roberta/roberta.cgi" target="_blank">http://www.purlgurl.net/~callgirl/roberta/roberta.cgi</a><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Deny linking pictures from external Websites