Unstoppable Domains โ€” AI Assistant

Bandwidth MOD

Spacemail by SpaceshipSpacemail by Spaceship
Watch
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.

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
*/
Best of luck
 
Last edited:
17
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I don't have a proxy site - but I did stay at a holiday inn express last nite. :)
cool site - Rep added!
 
0
•••
texasgamer said:
I don't have a proxy site - but I did stay at a holiday inn express last nite. :)
cool site - Rep added!
Thanks muchly texasgamer :) much appreciated.
 
0
•••
.htaccess:
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^domain.com$ [NC]
RewriteCond %{QUERY_STRING} !^$
RewriteRule ^(.*)$ http://www.domain.com/ [R=301,L]
Untested, however.
 
0
•••
Thanks SV!
 
0
•••
SecondVersion said:
.htaccess:
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^domain.com$ [NC]
RewriteCond %{QUERY_STRING} !^$
RewriteRule ^(.*)$ http://www.domain.com/ [R=301,L]
Untested, however.
Forgive my dumbassness lol.

What does that do SV?
 
Last edited:
0
•••
BillyConnite said:
Forgive me dumbassness lol.

What does that do SV?
About the same as your PHP implementation ;)
 
0
•••
SecondVersion said:
BillyConnite said:
Forgive me dumbassness lol.

What does that do SV?
About the same as your PHP implementation ;)
lol, good work! Thanks, tried to leave rep, but ofcourse I'm to fond of you apparently lol :D
 
0
•••
Sos

:(

I put the code just behind the "require 'PHProxy.class.php';" on line 13, then it generated this warning, due to the setcookies function in the PHProxy.class.php on line 627, is there any way to solve it, or just leave it

Warning: Cannot modify header information - headers already sent by (output started at E:\webroot\poxy\index.php:13) in E:\webroot\poxy\PHProxy.class.php on line 627
 
0
•••
hd2006 said:
:(

I put the code just behind the "require 'PHProxy.class.php';" on line 13, then it generated this warning, due to the setcookies function in the PHProxy.class.php on line 627, is there any way to solve it, or just leave it

Warning: Cannot modify header information - headers already sent by (output started at E:\webroot\poxy\index.php:13) in E:\webroot\poxy\PHProxy.class.php on line 627
Hey mate,
Try putting the code right at th top of the page, just below the "<?php".

Putting it on line 13 after other code may cause your error, I don't have the PHPRoxy MOD here with me just at the moment, so I can't tell you exactly why, but just give that a go and let me know how it goes.
 
Last edited:
0
•••
Thanks for the update Billy, applied the latest version immediately :)
 
0
•••
lordsafkad said:
Thanks for the update Billy, applied the latest version immediately :)
No worrrys :). There's not really much more I can do to the MOD now, I think it does all it needs to :), so I guess that's it lol. Unless anyone can find any bugs in it.

Regards
 
Last edited:
1
•••
BillyConnite said:
No worrrys :). There's not really much more I can do to the MOD now, I think it does all it needs to :), so I guess that's it lol. Unless anyone can find any bugs in it.

Regards,
Rhett.



Kick ass mod - bandwidth usage reduced dramatically...... and no bugs.
Green coming your way!
 
0
•••
rep added :)
 
0
•••
Thanks both of you :). Hope it helps :D
 
0
•••
BillyConnite said:
Hey all,

Well we all know how much of a problem hotlinking can be. With proxy sites it's even worse! This mod prevents hotlinking in all cases, saving you tonnes of bandwidth, and helping prevent illegal material viewing at the same time.

Description: The MOD checks firstly to see if only an object is being proxied (i.e. image, swf etc), if this is the case, it will check to see if the referer is from outside your website, if so, it will simply redirect to a page of your choice (homepage by default). And tada! That's it, this will prevent ANYTHING from being hotlinked through your proxy.

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:
/*
PHProxy bandwidth MOD 1.1 
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
*/
Best of luck,
Rhett.
Instead of
PHP:
// 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);

Why not do..
PHP:
// allow hotlinking from these sites, seperate by comma (make sure you eneter your site's domains)
$domains = array(
    'www.yourdomain.com',
    'yourdomain.com'
);
 
1
•••
SecondVersion said:
Instead of
PHP:
// 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);

Why not do..
PHP:
// allow hotlinking from these sites, seperate by comma (make sure you eneter your site's domains)
$domains = array(
    'www.yourdomain.com',
    'yourdomain.com'
);
Hey 2ndV,
That's pretty much what I had at first, then I changed it back to just a simple variables so that it's easiest on the person installing the MOD, some people with no php knowledge might a little worried or confused or something. So I think I'll stick with mine ;), thanks alot for the suggestion though, you've always got something constructive to add :)
 
0
•••
hey awesome mod,

i have noticed that when you enter your domains here:

$domains="www.yourdomain.com,yourdomain.com";

And type in a url in your url entry form it brings up and error. i had to delete the www.yourdomain.com and just leave the yourdomain.com to work (yes i know you have to put your domain instead of the yourdomain ) lol
 
0
•••
DonKon said:
hey awesome mod,

i have noticed that when you enter your domains here:

$domains="www.yourdomain.com,yourdomain.com";

And type in a url in your url entry form it brings up and error. i had to delete the www.yourdomain.com and just leave the yourdomain.com to work (yes i know you have to put your domain instead of the yourdomain ) lol
Hey DonKon,

Thanks for the kind words :)

So if you leave the www. in the domain, you get an error? That's strange, work's just fine for me... Could you do me a small favor if you have some time and put the www. back in, and let me know what the error was exactly?

Anyone else have this problem?

Thanks DonKon
 
Last edited:
1
•••
bump :P :). Just wandering whether anyone else had been having the same problem as DonKon. :), any input would be great so I can ensure this isnt happenning on other websites also.
 
0
•••
A cgi version of this script would be really really really useful.
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back