Image-Protector
Version 2.0
Protecting
your images from Casual-Copyright Infringers
and Malicious Bandwidth-Thieves
USING TWO TECHNOLOGIES
1. No-right click JavaScript and
2. Domain-Level Authentication using PHP
Both
are demonstrated below.
What
you will see here is a demo of the ImageServer
script which displays the image from a "hidden"
folder that you've configured within the script
and also a demo of the "No Right Click"
JavaScript program which will disable
the "Right Click" function in your visitor's
browser, whic
Now,
if you view the source of the image above, this
is the HTML code that you will see:
<img src="imgserver.php?img=apache_pb.gif">
Now,
when a call is made to the image server script,
it looks up your "secret" folder, and
then serves the image from the hidden directory.
So,
your image cannot be linked to directly by anyone
else from any other web site, mainly because:
1.
The image-hijacker can NEVER figure out
where exactly your image resides.
2.
Even if they linked directly using the source
found on this page, i.e.
<img src="http://WebmasterInABox.net/imgserver.php?img=apache_pb.gif">
the
script is configured in such a way that it will
accept requests ONLY from WebmasterInABox.net
(or your own domain)
So,
it will reject all requests from any other
domain.
There
are two parts to this script:
(1)
A image server script written in PHP which will
serve images from within a "secret"
directory that is known only to you, and
which can be easily customized.
(2)
A Javascript script which will disable the right-click
function on your browser (as mentioned above,
we cannot give you a demo of that script, as it
can be easily copied from the site).
The
primary goal of this script is very simple - to
protect others from linking directly to your images
- which can prove very costly to you in terms
of bandwidth, and also in terms of resources used.
By
using a combination of both (1) and (2),
you can pretty effectively protect your images
from being directly linked to.
Now,
remember that for your visitor to see your image
in his web browser (like Internet Explorer or
Netscape Navigator), it has to first get downloaded
to his hard disk (it is stored in a temporary
folder on his C:\Windows directory). So, there
is really nothing you can do to stop your visitor
downloading your image to his local hard disk,
and then uploading it to his server, and dislaying
it there.
That
then becomes a copyright issue, which is a totally
different ballgame altogether, and I'm not going
there anytime soon.
As
I just told you, he already has the image somewhere
on his hard disk. So, if he really wants it, all
he needs to do is just look for it - of course,
IF he knows where and how
to look for it.
We've
got to go along with the fact that more than 95%
of the web is surfed by the average user.
So,
that eliminates the possibility of someone copying
your images by 95%. For the remaining 5%, you
just can't do a darn thing about it :-)
The
Javascript part of the Image-Protector disables
the ability of your site visitors to use the "Right-Click"
function and alerts them when they try to do so
(though it is recommended that you don't do so).
The
PHP part stops those few remaining savvy visitors
who know how to look at the source of a page without
doing a "right-click".
Frankly,
you really can't do much to stop your images from
being stolen (except may be put them in a Java
applet or something - which is not at all advisable).
So,
what this script truly does is to discourage the
average Joe User from trying to link directly
to the images on your site, stealing your bandwidth
and making you pay for their crime!
|