home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Detecting hotlinking/referrals to a specific file?

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1969
Discussions: 200,914, Posts: 2,378,963, Members: 246,282
Old December 8th, 2004, 01:31 AM   Digg it!   #1 (permalink)
Member
 
Join Date: Oct 2004
Posts: 70
Detecting hotlinking/referrals to a specific file?

Hi all,
There is a file on my site that is definitely getting hotlinked to, and I'd really like to put a stop to it.
I'd like to find out who's doing it before I make it impossible with an htaccess file.

There is no doubt in my mind that the traffic is not coming from my users.
In November, the file in question got over 900 hits, while the rest of the files in the same section only got around 100 each.
I didn't even get 900 visits in November.

I made a little experiment to make sure it wasn't from my site.
At the beginning of December I changed the name of the file and the link to it, and put a dummy file in its place.
There isn't a link to the file from my site, but I've gotten 200 hits to it in the first week of the month.

Is there a way to see referrals to a specific file?
My hosting company uses Webalizer, and it does not show referrals to individual files.
There isn't anything out of the ordinary in my normal referral logs.

I have no problem with people sending visitors to my site to get the file, but linking to the file directly is not good.
It steals my bandwidth, robs me of visitors, and lets the other site get the credit for having the file (a rare Evanescence recording).

If anyone has any ideas, let me know.
Thanks!
__________________
http://www.t0xicwaste.com/
eccod is offline   Reply With Quote
Old December 8th, 2004, 01:54 AM     #2 (permalink)
Member
 
Cyberlore's Avatar
 
Join Date: Jan 2003
Posts: 129
Quickest fix is to search for an anti-leech script. You should be able to find one in whatever flavor of code you prefer (php/cgi/asp/etc) without much problem.
__________________
:: www.roken.org ::

=| part of the hurricane one network |=
Cyberlore is offline   Reply With Quote
Old December 11th, 2004, 08:12 PM     #3 (permalink)
Junior Member
 
Join Date: Dec 2004
Posts: 12
Does your host give you SSH?
Nosnam2 is offline   Reply With Quote
Old December 12th, 2004, 03:47 PM     #4 (permalink)
Member
 
Join Date: Oct 2004
Posts: 70
Quote:
Originally Posted by Nosnam2
Does your host give you SSH?

If you mean secure shell, I don't think so...

My father wrote me a custom cgi script that logs all referrals to every file in a directory, that should do the trick for me.
I haven't noticed any referrals to that file yet, they must have taken down the link after I messed up the audio file.
eccod is offline   Reply With Quote
Old December 12th, 2004, 03:58 PM     #5 (permalink)
Senior Member
 
James T's Avatar
 
Join Date: Jul 2004
Location: New Zealand
Posts: 582
Have a script in your machine that changes the name of the file being hot-linked daily and changes the page you have that refers to it at the same time. Then you make them work to fix their page rather than you having to work to fix their theft of bandwidth.

Edit: solution to match the scripting your web-host provides of course.
James T is offline   Reply With Quote
Old December 12th, 2004, 04:04 PM     #6 (permalink)
Member
 
Join Date: Oct 2004
Posts: 70
My host allows me to run arbitrary perl code, so I can pretty much do whatever I want...

All I would have to do to stop the problem is change the .htaccess file, but I'm trying to figure out who's doing it (mostly just for fun).
eccod is offline   Reply With Quote
Old December 12th, 2004, 04:09 PM     #7 (permalink)
Senior Member
 
James T's Avatar
 
Join Date: Jul 2004
Location: New Zealand
Posts: 582
Good, use perl to do it then. Remember that the offending party has changed their web page to point to you and it is then joe public who connects to you, this will be many different IP addresses and impractical to block. You can perhaps log the http-referrer value and send an image that contains the text 'unapproved hot-link, please visit http://yoursite/ for legitimate link' for anything from that referrer. I can't remember the exact code required for perl to do this but the referrer property is a standard one sometimes passed from the users web browser.

Edit: or only allow it to work when your own site is the referrer.
James T is offline   Reply With Quote
Old December 12th, 2004, 04:17 PM     #8 (permalink)
Member
 
Join Date: Oct 2004
Posts: 70
I can set the .htaccess file to only allow referrals that come from my domain, I think.

The perl script my dad wrote me (I'm not good in perl) is pretty cool.
There's an entry in the .htaccess file that redirects every request to a file in that directory to the cgi file.
The cgi file then logs the referral, and if it's not from my domain (or if it's a direct request), it delivers a different file.
I think that's pretty much what you're describing.
eccod is offline   Reply With Quote
Old December 12th, 2004, 04:21 PM     #9 (permalink)
Senior Member
 
James T's Avatar
 
Join Date: Jul 2004
Location: New Zealand
Posts: 582
Exactly, you can have some fun with alternate files .
James T is offline   Reply With Quote
Old December 12th, 2004, 04:35 PM     #10 (permalink)
Member
 
Join Date: Oct 2004
Posts: 70
I'm thinking goatse and/or tubgirl...
Is that wrong?

Too bad there's no way to stop the other thing I'm concerned about - people taking my images and using them as their own.
Since my site is a desktop wallpaper site, I really can't do anything to stop them from downloading the images (and still let people use the wallpapers).
I could put a big nasty stamp on all of them, but that's really not something I want to do.
eccod is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help - VB6 - Replacing Line in file darssus Webmastering and Programming 14 November 17th, 2004 09:36 AM
Weird ZIP files all over implexant Technical Support 8 March 17th, 2004 10:38 PM
RAM isn't recognized! Flav_cool General Tech Discussion 14 November 9th, 2003 10:35 PM
Word 2000 troubles ZENYO Applications and Operating Systems 7 June 4th, 2002 12:19 PM
need some creative ideas here...PLEASE HELP!!! zskillz Webmastering and Programming 1 December 1st, 2001 03:04 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2823)
Why is Khalid Sheikh Mohammed even .. (7)
Is the PSU I received dead? (10)
Install XP pro and a Vista laptop ?.. (8)
HIS HD5770 graphic card question (15)
A good PSU? (10)
Foreign voltage (7)
Print spooler problem (9)
New Computer wont recognize XP disc (7)
Dept. of HS: NSA 'Helped' Develop V.. (12)
Ideal cheap graph card for PC-Gamin.. (15)
EVGA 9800 gtx help with finding a g.. (7)
Modern Warfare 2: Who Bought It? (60)
Mysterious Boot manager (9)
Recent Discussions
Problem with speed step/turbo boost? (0)
SIS 740 and Widescreen (8)
Baffling Problem with my CPU/MoBo's. .. (0)
Display shows 3x5 inch in middle of s.. (0)
Print spooler problem (9)
windows vista security holes (3)
HIS HD5770 graphic card question (15)
Best file format to play on Windows H.. (0)
PSP Go bought in Japan (0)
Foreign voltage (7)
Asus P4G8X Mobo (3)
World's largest Monopoly Game using G.. (329)
EVGA 9800 gtx help with finding a goo.. (7)
Need hard disk drivers (4)
windows 7 internet problem (4)
What OS for a home server? (other tha.. (1)
Boot Problem? (0)
Logitech G9 laser gaming mouse $59.95.. (2)
$5 off any item with the purchase of .. (1)
Ideal cheap graph card for PC-Gaming? (15)
Install XP pro and a Vista laptop ?? (8)
Cloning old drive to new drive (6)
Amptron monitor G17FP-Black (0)
A good PSU? (10)
Is the PSU I received dead? (10)


All times are GMT -4. The time now is 11:29 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28