Meta refresh and hiding the referrer

From Visual Basic to GNU C, this is the place to talk programming.

Moderators: SecretSquirrel, just brew it!

Meta refresh and hiding the referrer

Postposted on Sun Aug 17, 2008 6:15 pm

I am developing a site whereby the my client is ordering webhits to a target site, and I suppose he will be paid for clicks. Before they get to the target, they are sent to the site I developed so that I can track his different "farmers" as I have been calling them. I decided to track by IP address which I know can change monthly or forcibly in some cases, but I figured this would be a very small percentages of people. So upon a visit, I check my database, if the ip address exists and is less than 1 month old, I redirect to a different place, otherwise I send them through to a second page that uses a meta refresh to (supposedly) switch the referrer to his site, and then onto the target.

I also made some reports etc. My problem is, his reports are showing different numbers, and even more disturbing to me is that the target is seeing the farmer as the referrer. Now, some DO show his website as the referrer, but not all of them, as should be the case. Ideas? I think I've nearly exhausted my investigation, but my last idea is the farmer has a cached version of the page I made changes to repeatedly to get it behave as I want, but because it's cached it's not fully picking up on those changes.

thanks!
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11907
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Meta refresh and hiding the referrer

Postposted on Tue Aug 19, 2008 9:46 am

Bumping for front page perusal!
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11907
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Meta refresh and hiding the referrer

Postposted on Tue Aug 19, 2008 4:42 pm

Isn't there a PHP command that can present a referrer different from where it's actually coming from?
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Meta refresh and hiding the referrer

Postposted on Tue Aug 19, 2008 4:54 pm

titan wrote:Isn't there a PHP command that can present a referrer different from where it's actually coming from?


You can use the header function.

header("Location: target.html");
Code: Select all
<?php
switch($_SERVER['HTTP_REFERRER']){
case 'somepage.html':
 header("Location: target.html");
 break;
case 'http://www.google.com':
 header("Location: process.php");
 break;
default;
 header("Location: index.php");
 break;
}
?>
Cubical 10
I only know enough to be dangerous.

Do ubuntu? pfsense
cubical10
Gerbil First Class
 
Posts: 184
Joined: Fri Mar 03, 2006 2:52 pm
Location: Montreal

Re: Meta refresh and hiding the referrer

Postposted on Thu Aug 21, 2008 7:09 am

I'm writing this in asp.net (vb), not PHP so that's not a viable solution unfortunately. From what I've gathered, a meta-refresh SHOULD kill the referrer and set the current page as the referrer, not to mention the page IS the referrer because it's sending the traffic to the actual site. Sometimes it shows my site as the referrer (which it is!) and other times, the farmer. Baffling.

All I have confirmed is that a simple redirect does not allow the referrer to be set, and I can only assume the site is using the last known referrer, in which case the the referrer would be the farmer - which is why I changed it to a meta refresh instead.

thanks guys, keep the ideas flowing!
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11907
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Meta refresh and hiding the referrer

Postposted on Thu Aug 21, 2008 7:39 am

Would this article on Spoofing the Referrer using HttpWebRequest be the solution?
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Meta refresh and hiding the referrer

Postposted on Thu Aug 21, 2008 10:35 am

This looks promising, I will give it a go. Thanks titan. What is odd is that I'm not really spoofing the URL, the traffic is REALLY landing on my page, but the page after is saying the farmer sent them to page X when that is not true.
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11907
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Meta refresh and hiding the referrer

Postposted on Thu Aug 21, 2008 1:18 pm

I guess what we're looking at is forcing the correct referrer, which spoofing will handle. Maybe. I think. :-?
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: Meta refresh and hiding the referrer

Postposted on Sun Aug 24, 2008 7:27 pm

I got around to trying, unfortunately it does not work. It errors out, I tried reading the comments but no help there either. I shouldn't need to spoof anything, the traffic is coming to his site, I redirect to a second page and then it goes to the target site from there. I'm going to try something more simplistic, a forced javascript submit.
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11907
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA


Return to Developer's Den

Who is online

Users browsing this forum: No registered users and 3 guests