cursed
03-08-2007, 11:26 PM
I have this code::
/*
PHProxy bandwidth MOD 1.1 by Rhett Canney (Billy Connite)
This MOD will stop any hotlinking via PHProxy, even if the
clients referer is not set!
Check out proxywebsite.org if you want to try hotlinking.
*/
// 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
*/
Can this script work on any web page?
I know people wont go breaking their back to help me, but if someone has time, and can help me, please PM me.
/*
PHProxy bandwidth MOD 1.1 by Rhett Canney (Billy Connite)
This MOD will stop any hotlinking via PHProxy, even if the
clients referer is not set!
Check out proxywebsite.org if you want to try hotlinking.
*/
// 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
*/
Can this script work on any web page?
I know people wont go breaking their back to help me, but if someone has time, and can help me, please PM me.