Kiloserve Proxy Hosting

Quality & Custom Proxy Hosting

Kiloserve Proxy Hosting header image 2

Hotlinking prevention for Phproxy, CGI-Proxy and Zelune

October 26th, 2007 · 9 Comments

Hotlinking in the proxy business happens when someone goes directly to a website without going through your web proxy’s home page. Hotlinking harms you and your proxy in two ways:

  1. People linking directly to images and/or videos are using/stealing your bandwidth
  2. You are losing advertising revenue since people go directly to the webpage without coming through your home page which holds the majority of your advertising.

PHProxy supposedly has hotlink prevention incorporated into it. It could be just me but I never managed to make it work. Instead you can add a piece of code to achieve hotlink prevention. Same for CGI-Proxy and Zelune.

For PHProxy, open up you index.php with Wordpad and add the following code right after <?php

/*
PHProxy bandwidth MOD by Rhett Canney (Billy Connite)
This MOD will stop any hotlinking via PHProxy, even if the
clients referer is not set!
*/

// Change this to your domain (no ‘www.’)
$domain=”443proxy.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();
}
}
}

For CGI-Proxy, open up you npi-proxy.cgi with Wordpad. Find
$HTTP_1_X=$NOT_RUNNING_AS_NPH?’Status:’:”HTTP/$HTTP_VERSION”;

and add the following code right under it:

if($ENV{’HTTP_REFERER’} =~ /^http:\/\/www.443proxy.com/)
{
}
else
{
&redirect_to(’http://www.443proxy.com/’, ”);

For Zelune proxy, open up you index.php with Wordpad and add the following code right after <?php (thanks to Matt - on DigitalPoint forums for this mod):

// Change this to your domain (no ‘www.’)
$domain=”yourdomain.com”;

// If no request:
if($_GET[’__new_url’]!=”"){
// 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[’__new_url’]!=”"){
// Redirect to homepage and finish script
header(”Location: http://www.” . $domain . “/”);
exit();
}
}
}

Tags: hotlink protection

9 responses so far ↓

  • 1 Irfan // Dec 18, 2007 at 11:30 pm

    The code for zelune does not seems to work. Once i apply the code, proxy wont open new page. Any ideas?

  • 2 Daisy // Sep 11, 2008 at 4:38 pm

    Hi um our school is blocked from getting into bebo and we are always trying to get a proxy so we can go into another website

  • 3 chantelle // Oct 15, 2008 at 6:10 am

    please let me on bebo i beg of you

  • 4 chantelle varley // Oct 15, 2008 at 6:11 am

    i love dobby

  • 5 kalliee copper // Oct 15, 2008 at 6:12 am

    i love david

  • 6 Leigh-Anne Crook // Oct 15, 2008 at 6:14 am

    ChannyBopp and LexiiBopp Eyer Wit Our 1 Inch Warriors With Purple Helmets …. Oh Yesssh

  • 7 Leigh-Anne Crook // Oct 15, 2008 at 6:14 am

    kaliieeeeeeeee big gob ———–wiv channyboppp and lexii-boppppp

  • 8 channy bopp // Oct 15, 2008 at 6:17 am

    looking up condoms 4 child d yeeeh heha lol
    wiv sexii lexii nugget

    dora has a purple warrior !!!!!!

  • 9 channy----boppp // Oct 15, 2008 at 6:20 am

    kalii has a purple warrior !!!!!!!! wiv a condom on her hed lol

Leave a Comment