/*
PHProxy bandwidth MOD by Rhett Canney (Billy Connite)
This MOD will stop any hotlinking via PHProxy, even if the
clients referer is not set!
Check out ProxyWebsite.com if you want to try hotlinking.
*/
// Change this to your domain (no 'www.')
$domain="insertyourdomain.com";
// If no request:
if($_GET['q']!=""){
// Get referer
$referer=$_SERVER['HTTP_REFERER'];
// Check to see if referer is not the proxys domain
$count=substr_count($referer,$domain);
// If there is an outside referer:
if($count==0){
// If there is a request:
if($_GET['q']!=""){
// Redirect to homepage and finish script
header("Location: http://www." . $domain . "/");
exit();
}
}
}
/*
END MOD
*/
It wouldn't be so bad if Chinese traffic wasn't worthless. Block the traffic from China and your problems are solved!![]()
Hot linking is a huge issue on proxy sites. The chinese like to suck major bandwidth by hot linking to (often hi-res) porn images. Place this code at the very top of your document if you are using phproxy.
HTML:/* PHProxy bandwidth MOD by Rhett Canney (Billy Connite) This MOD will stop any hotlinking via PHProxy, even if the clients referer is not set! Check out ProxyWebsite.com if you want to try hotlinking. */ // Change this to your domain (no 'www.') $domain="insertyourdomain.com"; // If no request: if($_GET['q']!=""){ // Get referer $referer=$_SERVER['HTTP_REFERER']; // Check to see if referer is not the proxys domain $count=substr_count($referer,$domain); // If there is an outside referer: if($count==0){ // If there is a request: if($_GET['q']!=""){ // Redirect to homepage and finish script header("Location: http://www." . $domain . "/"); exit(); } } } /* END MOD */
You do know that that prevents sites from linking to your proxy site other than the homepage? To properly prevent hotlinking and image linking you need to edit/add to phpproxy.class.php.
You do know that that prevents sites from linking to your proxy site other than the homepage? To properly prevent hotlinking and image linking you need to edit/add to phpproxy.class.php.