First of all - mods, if you think this should go in the Design&Development section feel free to move it.
I'm in the process of setting up a new site where I want full keyword-level tracking while using PHP redirects instead of direct affiliate links.
I take every incoming keyword and assign it a numeric id in a database.
I do this with this great script by our very own smaxor. :bowdown:
So for example, my landing page gets called like this:
That keyword is assigned a number, like 723 and set in the php variable $id
Now the next thing I wanna do is take this number and pass it along to the merchant. BUT... I do not want to link directly to the merchant from the landing page like this
but rather use a PHP redirect.
So I created a PHP redirect file called redirect.php and I can call this from anywhere on my landing page and pass along the $id to it like this:
And this is what my redirect.php file looks like:
So what's my problem?
Well, everything seems to work great, until the point where $subid is supposed to be passed along to the merchant. XY7 never gets my subid (I checked their detailed .csv subid stats file and had my aff. manager check this). They think I'm not passing the subid correctly in the aff. link URL.
I'm still fairly new to php so my guess is that I'm not handling the string or variables correctly somehow. Everything else works fine. Smaxor's script works, calling the redirect.php with a number works, and the redirect itself works.
Perhaps someone can point me in the right direction?
Danke!
Thank you!
Gracias!
Takk!
I'm in the process of setting up a new site where I want full keyword-level tracking while using PHP redirects instead of direct affiliate links.
I take every incoming keyword and assign it a numeric id in a database.
I do this with this great script by our very own smaxor. :bowdown:
So for example, my landing page gets called like this:
Code:
www.myfuglylandingpage.cum/index.php?keyword=n00bfodder
Now the next thing I wanna do is take this number and pass it along to the merchant. BUT... I do not want to link directly to the merchant from the landing page like this
Code:
[FONT="][URL="http://publishers.xy7.com/z/43422/CD3149/"]hxxp://publishers.xy7.com/z/43422/CD3149/[/URL][/FONT]
So I created a PHP redirect file called redirect.php and I can call this from anywhere on my landing page and pass along the $id to it like this:
Code:
www.myfuglylandingpage.cum/redirect.php?[COLOR=Lime][B]number[/B][/COLOR]=<? echo [COLOR=Yellow][B]$id[/B][/COLOR]; ?>
Code:
<?php
[B][COLOR=Cyan]$subid[/COLOR][/B] = trim($_GET['[COLOR=Lime][B]number[/B][/COLOR]']);
header( "Location: [FONT="][URL="http://publishers.xy7.com/z/43422/CD3149/"]hxxp://publishers.xy7.com/z/43422/CD3149/[/URL][/FONT]".[COLOR=Cyan][B]$subid[/B][/COLOR]) ;
?>
Well, everything seems to work great, until the point where $subid is supposed to be passed along to the merchant. XY7 never gets my subid (I checked their detailed .csv subid stats file and had my aff. manager check this). They think I'm not passing the subid correctly in the aff. link URL.
I'm still fairly new to php so my guess is that I'm not handling the string or variables correctly somehow. Everything else works fine. Smaxor's script works, calling the redirect.php with a number works, and the redirect itself works.
Perhaps someone can point me in the right direction?
Danke!
Thank you!
Gracias!
Takk!