IT.COM

Additional way to stop proxy referrers.

Spaceship Spaceship
Watch
Impact
9
I have noticed recently that my proxy has been getting a huge amount of visitors on proxified pages, compared to the homepage. This seems to be ebcause somehow websites are referring users direct to them, I've got referral blocks enabled, but they somehow get past this. So this is something which I just came up with, for PHProxy (thats all i've tested on, should work with others)
PHP:
<?php
/*
Creator: Lee Findlow
Website: http://lee.findlow.info/

Proxy Referral Script
Stop hidden referrers from accesing your website
Variable that will be present if accesing a proxified page, change if necessary

Install by placing at top of index.php file (PHProxy).
It works by detecting if the person accessing a proxified page has been to the home, page, if so a session variable is set, and it allows them to continue, 

otherwise they will be redirected "back home".
*/
$var	=	$_GET['q'];
//Start Session
session_start();
//Check if the user needs to be redirected
if(!empty($var) && $_SESSION['visited'] == ''){
	//Set visited to true
	$_SESSION['visited']	=	'true';
	//Redirect home
	header('Location: http://websitebypass.info/');
	exit;
} else{
//Otherwise user has accessed the homepage, so allow them access to prixified pages
	$_SESSION['visited']	=	'true';
}
?>
A short explanation of what it does is above, you just need to replace the homepage of your proxy in the script (currently set to websitebypass.info). I've only just created this, and put it up on my proxy, and it seems to be working, although I think it's a bit buggy, so feedback is apreciated!

Thanks,
Lee
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Very nice Lee. I don't have a proxy myself but I think for the proxy users this will come in handy.

Thanks a lot for sharing this with us. :)
 
0
•••
thanks, i have phpproxy at my proxy site (wireroxy.info)

i guess i will test it out once the stats goes up..

thanks you :)
 
0
•••
I have a proxy site as well, and I just noticed that some people bypass the main page. I was just thinking about a simpler way to do it and couldn't you just add a hidden input to the form on the main page and test to see if that variable has been passed? Doing that would be a lot simpler, and it should be effective because its harder to fake a post variable.

PHP:
if($_GET[q]!=""){
if(($_SERVER['HTTP_REFERER']!="http://www.Domain.com")&&($_SERVER['HTTP_REFERER']!="http://Domain.com")&&($_SERVER['HTTP_REFERER']!="http://www.Domain.com/index.php")&&($_SERVER['HTTP_REFERER']!="http://Domain.com/index.php")){
header("Location: index.php");
}}
This is just my little work around, it should work.
 
0
•••
0
•••
@jroy I suppose that would work, although wouldn't it require the "q" var to be passed (through) post into every proxified page, which would be very difficult to achieve with standard hyperlinks, hence limiting you to not being able to browse any pages within proxified sites.
 
0
•••
Hmm, I suppose it would, I hadn't really thought about that. Thanks for pointing it out.
 
0
•••
I still did not understood what is this script used for?
 
0
•••
awesome, this works great!

Please post any updates you make to the script.

thanks
 
0
•••
cancer10 said:
I still did not understood what is this script used for?
This script used for blocking for visitor go directly to proxy page, in this case the proxy site owner can not get revenue

hth :hehe:
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back