vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   VERY quick avatar/attachment protector (https://vborg.vbsupport.ru/showthread.php?t=41065)

Mr_P 10-24-2002 03:24 AM

Quote:

Originally posted by omniweapon
I installed this hack, but users are complaining saying they can't see the images even when they're on the forum. And I've put these in the referrers array:

www.ppgworld.com , ppgworld.com , 206.126.4.17

The forums are located on forums.ppgworld.com

easy answer tell em to allow your site though their firewall not sure how it works but thats all i did and it works.

Before nobodys avator showed up so allowed pass on firewall and they all show now.

SWFans.net 10-31-2002 08:10 AM

I like the array set up of this one over how the other hot link prevention hack functions, but this hack just doesn't work for me, even with no firewall. No matter what, I get the echoed text I added so I could see what was going on.
PHP Code:

$referers = array ('www.sw-fans.net','sw-fans.net','swforums.net','www.swforums.net'); 

function 
check_referer($referers){ 
   if (
count($referers)){ 
      
$found false
      for (
$x=0$x count($referers); $x++){ 
      
$temp explode('/',getenv("HTTP_REFERER")); 
      
$referer $temp[2];
         if (
ereg ($referers[$x], $referer)) { 
            
$found true
         } 
      } 
      if (!
$found){
      echo 
"No hot linking allowed"
      exit;
      } 
         return 
$found
      } else { 
         return 
true;
   } 


check_referer($referers); 


Boofo 12-29-2002 09:15 PM

You moved this line up a few lines from the original code, that is probably why you can get it to work.

Code:

for ($x=0; $x < count($referers); $x++){

Gutspiller 01-25-2003 05:14 PM

I can't get this hack to work over multiple domains. I tested it using one and it worked for me, so I now know it's working, but when I add a second domain like this:

PHP Code:

$referers = array ('www.theforumz.com','theforumz.com','209.197.232.166','www.3dnewz.com','3dnewz.com'); 

It still doesn't work from 3dNewz.com. I didn't add the ip of 3dnewz.com because 3dnewz.com just redirects to TheForumz.com

Can somebody help me on how to get this to work with multiple domains? I have about 5 I need to add to this hack. Please help.

smestas 01-31-2003 03:53 PM

CJi,

Thank you for this hack. It worked perfect firt time!

Thanks!

laycomp 03-24-2003 04:54 PM

Very much help indeed, THANK YOU CJi!! :knockedout:

laycomp 03-25-2003 03:54 PM

I am having some problems.

I am using vb 2.3, I cannot get link protection for either avatar or attachment.

The avatars appear in my forum as typical "miising image" icons, I have worked with many perl/php scripts and well aware on entering referers for protection, I however, cannot get this too work. As far as attachments, when someone clicks, from the forum, an attachment link, he goes into a blank page.

I have tried my domain, my IP...you name it.

I do have a router.

Any suggestions please?

Regards,

LC

CJi 04-27-2003 09:07 PM

To be honest, for ultimate protection it's best to use htaccess. What you need to bear in mind is users can choose to withold, or even warp referrers, so hacks like this will never work. It's annoying, but 'one of those things'

NanoEntity 04-28-2003 12:41 AM

There is a very simple way, you can do it with .htaccess, even diplay an image of your choice on a website that is linking your image.

Can protect whole domain or just 1 folder.

Anyways, nicely done :)

Boofo 04-28-2003 12:46 AM

Quote:

Today at 08:41 PM NanoEntity said this in Post #39
There is a very simple way, you can do it with .htaccess, even diplay an image of your choice on a website that is linking your image.

Can protect whole domain or just 1 folder.

Anyways, nicely done :)

How would you do that?


All times are GMT. The time now is 05:12 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02377 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete