|
|
 |
RE: Re[2]: FN-FORUM Site Logs
date posted 13th June 2002 15:08
> hope you don't mind me asking but how does that script work
Not at all, it's fairly straitforward...
First, obviously you have to replace all image tags with a call to the
script, e.g. instead of
you would use
The script itself checks the referer asking for the image, e.g. in Perl
$ENV{'HTTP_REFERER'}
It then compares this to a list of allowed referring servers. If it's on the
list, it opens the image file requested (you will have to map the URL path
to a local file path) and writes the entire file out to the browser
(remembering to send the correct content-type header first, e.g.
Content-type: image/jpeg).
If the referer is not on the list, it just redirects the user to the default
"this image has been stolen" picture. It also writes to a log file of "bad
sites" so that my friend then has the URL of the offending page in his log,
and he can surf on over there and email the owner a warning too if he wants
to.
Finally, if you're using this method then it's not necessary (indeed, not
really desireable) to keep your images within a publicly accessible web
directory - you can move all of the images somewhere else on the hard disk,
and as long as the script has access to them then the script provides the
only public interface onto the images.
Once you know the URL of the page stealing your images, you can have even
more fun. Somebody on a list I'm on (don't think it was this one, was it?)
had their photo stolen by somebody who was scamming on Ebay - the scammer
wanted to give himself a false ID and wanted to put on a human face, only
not his own. The guy whose photo it was discovered that this was being done,
and replaced it on his server with another picture which basically said "I
am a scammer and a rip-off merchant. I have set up this new false ID because
all my other many Ebay accounts have been closed down because I conned
people. Do not buy anything from me unless you want to lose your money".
Dan Sumption
http://www.pernoctator.com - Business
http://www.sumption.org - Pleasure
http://www.bradonpace.com - Up a level
|
 |
|