NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Webmaster Tutorials
Reload this Page Additional way to stop proxy referrers.

Webmaster Tutorials Instructional webmaster-related how-to's and tutorials.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-29-2007, 04:58 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Mar 2006
Location: United Kingdom
Posts: 413
lee101 is a jewel in the roughlee101 is a jewel in the roughlee101 is a jewel in the rough
 




Additional way to stop proxy referrers.


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 Code:
<?php
/*
Creator: Lee Findlow
Website: http://lee.findlow.info/

Proxy Referral Script
Stop hidden referrers from accesing your website
????: NamePros.com http://www.namepros.com/webmaster-tutorials/389767-additional-way-to-stop-proxy-referrers.html
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!
????: NamePros.com http://www.namepros.com/showthread.php?t=389767

Thanks,
Lee
__________________
Linux Screenshots
lee101 is offline  
Old 10-29-2007, 07:32 AM   #2 (permalink)
I'll do it
 
-Nick-'s Avatar
Join Date: Dec 2005
Location: India
Posts: 6,927
-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness
 


Member of the Month
September 2007
Adoption
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.
-Nick- is offline  
Old 11-08-2007, 11:03 PM   #3 (permalink)
Senior Member
 
rome2ng's Avatar
Join Date: Oct 2005
Location: 1°88′N, 7°95′E
Posts: 1,388
rome2ng has much to be proud ofrome2ng has much to be proud ofrome2ng has much to be proud ofrome2ng has much to be proud ofrome2ng has much to be proud ofrome2ng has much to be proud ofrome2ng has much to be proud ofrome2ng has much to be proud of
 


Adoption
thanks, i have phpproxy at my proxy site (wireroxy.info)

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

thanks you
__________________
What's a good blog ? Find out here [+++]
[http://treoo.com]- S'pore Local Gadget Store® - Now Online
For Sales : | Ads Development Site [neatad.com] -HOT |
rome2ng is offline  
Old 11-17-2007, 11:12 AM   #4 (permalink)
Senior Member
 
jroy's Avatar
Join Date: May 2004
Location: Connecticut
Posts: 2,804
jroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud of
 



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 Code:
if($_GET[q]!=""){
????: NamePros.com http://www.namepros.com/showthread.php?t=389767
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.
__________________
Free Arcade Games
jroy is offline  
Old 11-22-2007, 01:39 PM   #5 (permalink)
First Time Poster!
Join Date: Nov 2007
Posts: 1
Piree is an unknown quantity at this point
 



Thnx m8
Piree is offline  
Old 11-24-2007, 04:54 AM THREAD STARTER               #6 (permalink)
NamePros Regular
Join Date: Mar 2006
Location: United Kingdom
Posts: 413
lee101 is a jewel in the roughlee101 is a jewel in the roughlee101 is a jewel in the rough
 




@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.
__________________
Linux Screenshots
lee101 is offline  
Old 11-24-2007, 08:58 AM   #7 (permalink)
Senior Member
 
jroy's Avatar
Join Date: May 2004
Location: Connecticut
Posts: 2,804
jroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud ofjroy has much to be proud of
 



Hmm, I suppose it would, I hadn't really thought about that. Thanks for pointing it out.
__________________
Free Arcade Games
jroy is offline  
Old 12-04-2007, 10:07 AM   #8 (permalink)
Account Closed
 
cancer10's Avatar
Join Date: Sep 2005
Location: India
Posts: 342
cancer10 is on a distinguished road
 



I still did not understood what is this script used for?
cancer10 is offline  
Old 12-04-2007, 04:19 PM   #9 (permalink)
Senior Member
 
VirtualT's Avatar
Join Date: Aug 2005
Location: afloat.com
Posts: 1,112
VirtualT has much to be proud ofVirtualT has much to be proud ofVirtualT has much to be proud ofVirtualT has much to be proud ofVirtualT has much to be proud ofVirtualT has much to be proud ofVirtualT has much to be proud ofVirtualT has much to be proud of
 



awesome, this works great!

Please post any updates you make to the script.

thanks
VirtualT is offline  
Old 12-29-2007, 08:27 AM   #10 (permalink)
NamePros Member
 
dherwan's Avatar
Join Date: Jun 2007
Posts: 124
dherwan is an unknown quantity at this point
 



Originally Posted by cancer10
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
????: NamePros.com http://www.namepros.com/showthread.php?t=389767

hth
dherwan is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 08:25 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger