Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
03-23-2017, 02:02 PM | #1 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
How to preserve referrer url when redirecting with php to affiliate site
Gfy techs help!
I made a page with simple redirection, something similar to: Code:
header("HTTP/1.1 301 Moved Permanently"); header("Location: $_SERVER['QUERY_STRING']", true, 301); exit; |
03-23-2017, 02:05 PM | #2 |
Confirmed User
Industry Role:
Join Date: Jun 2012
Location: All Over
Posts: 3,917
|
I'd love to see the answer too. Here's a bump for you, my man.
__________________
|
03-23-2017, 02:29 PM | #3 |
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,234
|
Hmm that should do the job, could be simply how program stats are broken or they have multiple redirects which deletes original refferer so you cant do shit with it. Ask sponsor for tracking id, where you would put your refferer url.
__________________
For GFY administration inquiries- email info at gfy.com or send PM. For advertising inquiries - email marketing at gfy.com Inquiries which are not related to administration or advertising on GFY wont be processed. |
03-23-2017, 03:09 PM | #4 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
Nah, that's not the sponsor thing I think, at least not a single case, I could be wrong though. I tested on a few. I think it's just the way php and web browsers work, same with javascript, it would not pass the referrer. But server redirection on the other hand like in htaccess would. I believe though there must be some way to trick browsers with php to pass it. Reading stackexchange at the moment, but the more I read the more mess is in my head and it's already suffering tonight from a headache. So I have thought, that perhaps someone here done it before and will save me a bit of time and struggle.
|
03-23-2017, 04:01 PM | #5 |
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,232
|
Code:
<?php $redirect_page = "https://www.example.com/page-two.php"; if($_SERVER['QUERY_STRING']){ $query_sign = "?"; }else{ $query_sign = ""; } header("Location: $redirect_page.$query_sign".$_SERVER['QUERY_STRING'], true, 301); exit; ?> |
03-23-2017, 08:54 PM | #6 | |
l8r
Industry Role:
Join Date: Oct 2002
Posts: 13,440
|
Quote:
Code:
<meta http-equiv="refresh" content="0; url=page_to_go_too"> Code:
<html> <head> <meta http-equiv="refresh" content="0; url=<?php echo $_SERVER['QUERY_STRING']; ?>"> </head> <body> </body> </html> |
|
03-23-2017, 09:38 PM | #7 | |
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,232
|
Quote:
|
|
03-24-2017, 04:54 AM | #8 |
Confirmed User
Industry Role:
Join Date: Jun 2012
Posts: 457
|
|
03-24-2017, 06:06 AM | #9 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,681
|
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
03-24-2017, 07:48 AM | #10 |
l8r
Industry Role:
Join Date: Oct 2002
Posts: 13,440
|
Is there a problem with my solution? Or am I mis-interpreting something? Proof of concept: http://www.hatterasdesigns.com/testr...test_redir.php Code:
<html> <head> <meta http-equiv="refresh" content="0; url=<?php echo $_SERVER['QUERY_STRING']; ?>"> </head> <body> </body> </html> The madspiders.com page simply echoes the referer Code:
<?php echo "referer is " . $_SERVER['HTTP_REFERER']; ?> |
03-24-2017, 07:55 AM | #11 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,883
|
you are supposed to do the opposite (hide the referer), so the sponsor doesn't steal your traffic sources/methods/etc...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
03-24-2017, 08:00 AM | #12 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
Maybe you are right. I was thinking about it. All in all I got details on my end in my own logs (that was the whole purpose of this redirection page, so that programs don't cheat me on the actual numbers) and also there are campaign tools in most programs that can shed some light on the question where the traffic comes from. So yeah, maybe you are right.
|
03-24-2017, 02:39 PM | #13 |
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,232
|
|
03-24-2017, 03:16 PM | #14 |
frc
Industry Role:
Join Date: Jul 2003
Location: Bitcoin wallet
Posts: 4,663
|
I used to always re-direct through a fake tgp to show sponsors a legit looking referer.
__________________
Crazy fast VPS for $10 a month. Try with $20 free credit |
03-24-2017, 04:52 PM | #15 |
l8r
Industry Role:
Join Date: Oct 2002
Posts: 13,440
|
|
03-24-2017, 10:21 PM | #16 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,681
|
i about the GIF.
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
|
|||||||
Bookmarks |
Thread Tools | |