Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2009, 11:35 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Protecting Forum Images from Hot linking

Hi All

Is there a way to protect forum images to prevent people copying them elsewhere via hotlinking?? Just noticed a few of on my forum have been linked this way, adds to my bandwidth too

Watermarking is an idea but that won't stop people 100%, and we all know that the "no right click hack can be bypassed".

Would be nice to come up with an idea that would benefit Forum Owners, and prevent their images from being hotlinked like this. I know people will always copy images and pictures, But Hotlinking can use up a lot of your bandwidth.

For other sites, however, it's a much bigger problem. If a 100K JPEG is hotlinked on a site that gets, say, 1,000 hits a day, that?s 100MB of data transferred from your site without a single person actually visiting your site. If you have only a few gigabytes of transfer available per month ? or worse, pay money per gigabyte ? this can add up. And if someone were to leech an entire gallery from your site ?

I wonder what do artwork and graphic forums do to prevent this??

In my case, i have deleted the two images
Reply With Quote
  #2  
Old 01-19-2009, 01:16 AM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have cpanel you can do it from there.
Reply With Quote
  #3  
Old 01-19-2009, 01:34 AM
gct13 gct13 is offline
 
Join Date: Jan 2005
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you can use .htaccess files this page may be a help to you:

http://www.htaccesstools.com/hotlink-protection/
Reply With Quote
  #4  
Old 01-19-2009, 04:58 AM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, Thanks guys i'm going to give the .htaccess a bash later, and perhaps do it so it replaces the picture with another one , That way i can get some free advertising for my forum

Couldn't wait

This is what i added to my .htaccess file right at the bottom

Code:
RewriteEngine on 
RewriteCond %{HTTP_REFERER} !^$ 
RewriteCond %{HTTP_REFERER} !^http://www.ukbusinesslive.co.uk/forum/.*$ [NC] 
RewriteRule .(gif|jpg)$ http://www.ukbusinesslive.co.uk/forum/images/misc/hotlink.jpg [R,L]
so when someone hotlinks to an image on my site the image will get replaced by this one



so this is what you need to do...

Open up your notepad or another text editor, and copy the code above to it. Name this file .htaccess and make sure it doesn't have an extension on the end, like .txt. If it is named .htaccess.txt, rename it .htaccess. Save it and upload it to your main directory on youir server. Or, you can upload it as .htaccess.txt, and rename it when it's on your server. If you already have a .htaccess file in your directory, because you have an IP block or something, just put the code beneath whatever you already have.

Replace mysite with the url of your site. Replace the hotlink.jpg with the url of the image you want to show up instead of your own when people hotlink to it.

Now i'm look forward to some free advertising
Reply With Quote
  #5  
Old 01-19-2009, 01:39 PM
Vaupell's Avatar
Vaupell Vaupell is offline
 
Join Date: Apr 2008
Location: Esbjerg, Denmark
Posts: 1,036
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now this is pretty sweet. haha
Reply With Quote
  #6  
Old 01-19-2009, 05:16 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Vaupell View Post
now this is pretty sweet. haha
The more i think of it the more i love it

I thought about doing it from cpanel, but no, I think we need to do a little deterant and a spot of Free advertising. I can just imagine the look on their faces when they see the replacement pic

I'll write this up as an article, so everyone can learn how its done, and its handy to refer back to :up:
Reply With Quote
  #7  
Old 01-20-2009, 05:16 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice big image, I like!
Reply With Quote
  #8  
Old 07-14-2009, 10:38 PM
JesterP JesterP is offline
 
Join Date: Jun 2007
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looking for similar help, I used the examples given here and am unable to prevent hotlinking to albums on my site. The url contains picture.php, not jpg|gif|png.

Code:
http://www.myforum.com/forums/picture.php?albumid=88&pictureid=9526
Code:
# stop hotlinking and serve alternate content
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?myforum.com [NC]
RewriteRule .(jpg|jpeg|png|gif)$ http://www.myforum.com/images/hotlink.jpe [R,NC]
That code works, but need to include picture.php in there and I cannot seem to get it to work.

Thank you
Reply With Quote
  #9  
Old 08-06-2009, 12:19 AM
BarelyHangingOn BarelyHangingOn is offline
 
Join Date: Feb 2003
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't get it to work either it appears that all photo albums can be hotlinked. If anybody has a clue it would be nice.

BTW adding php to last line does not work either.
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04581 seconds
  • Memory Usage 2,240KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete