Shirley7788
Newbie
- Apr 21, 2009
- 27
- 2
I want to make my .php link (direct to my aff link) on my LP has dynamic tracking id base on google search query, how can I do that?
example:
search: lose weight
the tracking id become loseweight (better if you can spin it like losew, lw,lweight,lewt)
What I'm currently doing is as below (I'm having problem
)
Top of wordpress post:
<?php $seedvar=$_GET['q'];?>
on LP:
<a href="http://mydomain.com/afflinkredirect.php?id=<?php echo $seedvar;?>">
redirect .php:
<?php
header('Location:http://aff.vendor.hop.clickbank.net/?tid=.$_GET['id']');
exit();
?>
I'm totally noob in coding, just following some example and some trial (no luck and go nuts
). Can somebody kindly help me on this?
P/S: I got this error
1)
Parse error: syntax error, unexpected T_STRING in /home/username/public_html/mydomain.com/recommends/mybestrecommendonEARTH.php on line 2
2)
somehow the link on LP show
http://mydomain.com/afflinkredirect.php?id=
which is blank after id, I thought it would "scrape" the ?q=lose+weight from google search string?
example:
search: lose weight
the tracking id become loseweight (better if you can spin it like losew, lw,lweight,lewt)
What I'm currently doing is as below (I'm having problem
Top of wordpress post:
<?php $seedvar=$_GET['q'];?>
on LP:
<a href="http://mydomain.com/afflinkredirect.php?id=<?php echo $seedvar;?>">
redirect .php:
<?php
header('Location:http://aff.vendor.hop.clickbank.net/?tid=.$_GET['id']');
exit();
?>
I'm totally noob in coding, just following some example and some trial (no luck and go nuts
P/S: I got this error
1)
Parse error: syntax error, unexpected T_STRING in /home/username/public_html/mydomain.com/recommends/mybestrecommendonEARTH.php on line 2
2)
somehow the link on LP show
http://mydomain.com/afflinkredirect.php?id=
which is blank after id, I thought it would "scrape" the ?q=lose+weight from google search string?