View Full Version : I dont think no one had thought of this...
Rapdis
08-29-2002, 06:07 PM
WHAT A BIG PROBLEM I HAVE.....
Bandwidth stealers...
people are using our hosted avatars on their sites... consuming a hell of a lot of bandwidth, is there a hack to stop this?
changeing avatar names daily and everywhere its displayed?
or something like that?
please help :ermm:
Chris M
08-29-2002, 06:18 PM
There is a piece of code you can put in the avatar.php and attachment.php files to stop this...
Here :
$referers = array ('www.yoursite.com','yoursite.com','your sites ip address');
function check_referer($referers){
if (count($referers)){
$found = false;
$temp = explode('/',getenv("HTTP_REFERER"));
$referer = $temp[2];
for ($x=0; $x < count($referers); $x++){
if (ereg ($referers[$x], $referer)) {
$found = true;
}
}
if (!$found){
exit;
}
return $found;
} else {
return true;
}
}
check_referer($referers);
Just insert that after <?php and before $noheader=1;
//require("./global.php");
You will need to change the "www.yoursite.com", "yoursite.com", and "your sites ip address" to your info;)
Satan
Rapdis
08-29-2002, 06:32 PM
thanks man...
thank god...
also... i dont know my site IP, how can i check that?
Rapdis
08-29-2002, 06:36 PM
is this it? http://www.eamnesia.com/hostinfo/i.jhtml
Rapdis
08-29-2002, 06:38 PM
and will the IP eva change? if it does will the IP bit effect the site?
Logician
08-29-2002, 06:39 PM
.htaccess tutorial in this thread (https://vborg.vbsupport.ru/showthread.php?s=&threadid=40079&highlight=.htaccess) can also help you configure your .htaccess to prevent stealing of ALL images of your site..
Chris M
08-29-2002, 06:42 PM
Unless you have a dedicated ip, your ip you put as your host's ip...
Your ip should be in the admin panel of your site...
Satan
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.