tracking through php redirect?

Status
Not open for further replies.

akk0

Danny Trejo Power!
Nov 7, 2006
179
3
0
I've started a campaign where the landing page is simply a .php that redirects to my azoogle link. When I use a landing page I use <?php echo str_replace("-", " ", $_GET["kw"]); ?> as the subid of the affiliate link and add ?kw={YSMKEY} to my landing page url and it works. But when I use a php redirect that looks like this:
PHP:
<?php
header( 'Location: http://www.adsjmp.com/track.asp?a=Csfgsag&b=sdfsdgfsg=0&l=0&o=<?php echo str_replace("-", " ", $_GET["kw"]); ?>&p=0' ) ;
?>

then I can't see what keyword generated the conversion, it literally says that "<?php echo str_replace(\-\ \ \ $_GET[\seed\])" was the keyword that generated the conversion. How can I keep using a redirect but still know what keyword lead to the conversion?

Thanks
 


The way I've always done this is

Code:
<?php

$tracking = str_replace([COLOR=White]"-", " ", $_GET["kw"]);
$raw_link1 = "Location: http://www.adsjmp.com/track.asp?a=Csfgsag&b=sdfsdgfsg=0&l=0&o=";
$raw_link2 = "&p=0";

$link = $raw_link1.$tracking.$raw_link2;
header($link);
?>
[/COLOR]
its a little ugly, but it works for me.
 
Or if you want to keep that oneliner of yours

Code:
<?php 
header('Location: http://www.adsjmp.com/track.asp?a=Csfgsag&b=sdfsdgfsg=0&l=0&o=' . str_replace('-', ' ', $_GET['kw']) . '&p=0');
?>
 
Or if you want to keep that oneliner of yours

Code:
<?php 
header('Location: http://www.adsjmp.com/track.asp?a=Csfgsag&b=sdfsdgfsg=0&l=0&o=' . str_replace('-', ' ', $_GET['kw']) . '&p=0');
?>



Thanks guys. Micker's code didn't work for some reason but tyr897's did. Is there a way to have two different links rotate instead of just one while still tracking like this?
 
Status
Not open for further replies.