- Impact
- 109
Bandwidth MOD
Version: 1.1
Installation: Simply copy and paste the mod code into your index.php page, just below the '<?php' at the top of the page.
Best of luck
Version: 1.1
Installation: Simply copy and paste the mod code into your index.php page, just below the '<?php' at the top of the page.
PHP:
/*
Bandwidth MOD 1.1
*/
// allow hotlinking from these sites, seperate by comma (make sure you eneter your site's domains)
$domains="www.yourdomain.com,yourdomain.com";
// convert domains into an array
$domains=explode(",",$domains);
// if there is a request:
if($_GET['q']!="")
{
// get referer
$referer=explode("/",($_SERVER['HTTP_REFERER']));
// if the referer is not allowed:
if(!in_array($referer[2],$domains))
{
// redirect to homepage and finish script
header("Location: http://".$domains[0]."/");
exit();
}
}
/*
END MOD
*/
Last edited:







