HOTLINKING HOTLINKING
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

HOTLINKING

Started by sigepjedi, June 17, 2004, 05:17:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sigepjedi

I have read all the posts on Hotlinking, and unfortunatly the .htaccess will not work for me on my windows box.

I have two primary pages that I am seeing is getting hit with Hotlinking:
1.) viewImage.php
     This was added as a mod for watermarking the image

2.) get_file.php
     

Both of these are being hotlinked, and I would like to do some http referer checking at the tops of these to prevent the hotlinking. I realize this isnt 100%, but its better than nothing. Im not too good with php, but code in coldfusion.

I basiclly want to check the referer at the top, and if its contained in a list of allowed sites, allow the page to continue processing as normal. If its not contained in the allow list of sites, then display a different image.

Thanks in advance.

Joachim Müller

what exactly is your question, you seem to know pretty well what you're doing. You'll need something likeif ($HTTP_REFERER == 'http://foo.com' || $HTTP_REFERER == 'http://bar.com') {
// here goes the regular code from the file
} else {
print 'You're a nasty boy, you mustn't hotlink my pages';
}


GauGau