home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 1773
Discussions: 188,401, Posts: 2,243,601, Members: 232,629
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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

Most Active Discussions
Is It Just Me? (2906)
Unarmed man on his stomach shot by .. (6)
Misery Loves Company... (2144)
New Build ( Finally ) (6)
CPU wont boot (7)
Building a gaming computer advice (5)
I think I just killed my computer w.. (24)
Folderchat Weekday thread (444)
Upgrading RAM (6)
Recent Discussions
Laptop proccesor to desktop mob.. (1)
What is the best external enclo.. (0)
Partition Magic 7.0 (Unallocate.. (17)
For cheap price and good qualit.. (1)
Left 4 Dead Small Freezes (3)
RCA 52Inch HDTV wont turn on (4)
wishin i could edit my aol prof.. (0)
Sporadic internet connectivity (2)
Assassins Creed PC Problems (40)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 03:40 AM.
TechIMO Copyright 2008 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