Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Referring URL/Redirect problem
Old 10-23-2008, 07:58 PM Referring URL/Redirect problem
mr.aliks's Avatar
Average Talker

Posts: 27
Trades: 0
I'm working on a site that deals with banner serving, so users sign up and trade banner impressions/clicks.

My problem is this: Say a user places my banner code on their site which displays random banners.

Then a visitor comes by, clicks on the banner on Site1 which takes him to Site2 through http://myexchangesite.com/linkout.php?bannerid

The problem lies when the webmaster of Site2 that is receiving the visit is seeing in his Google Analytics that the referral came from Site1 rather than from my banner serving site even though when a user clicks on a link they're actually clicking on http://myexchangesite.com/linkout.php rather than the direct URL to Site2.

In the file linkout.php, there is a server redirect:
header ("Location: $_GET[url]");

How do I change this so that the referring site becomes my exchange site rather than the site where they clicked the banner?

Thanks
__________________

Please login or register to view this content. Registration is FREE
mr.aliks is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-24-2008, 03:57 AM Re: Referring URL/Redirect problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You can't.

A website cannot set or change referrer headers, ONLY the client browser can set the referrer.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-24-2008, 04:08 PM Re: Referring URL/Redirect problem
mr.aliks's Avatar
Average Talker

Posts: 27
Trades: 0
I understand that, but how can I change the redirect code so that the user ends up actually visiting myexchangesite.com/linkout.php so then the referrer is myexchangesite rather than just a redirector of traffic?
__________________

Please login or register to view this content. Registration is FREE
mr.aliks is offline
Reply With Quote
View Public Profile
 
Old 10-24-2008, 04:26 PM Re: Referring URL/Redirect problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
have them land on the page, and they will have to click again. It's the "click" that sets the referrer field.

And document.referrer is a read only property for javascript.

About the only option available to you will be to use a 302 redirect which should drop the referrer field, then add a url parameter (querystring) to the target URI for the recipient site to track.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Referring URL/Redirect problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23418 seconds with 12 queries