krilin50
Regular Member
- Oct 26, 2008
- 262
- 19
Please find below my wp and php question. I would like to redirect my traffic after the click has happend on the wp page to either a normal desktop affiliate offer or to a mobile affilite only offer. I am currently using a simple affiliate php script that jumps to the affiliate merchant url.
<a href="affiliate.php?m=offer1">offer1</a>
Where XXXXXX is the merchant.
the php CODE LOOKS LIKE THIS
$m = $_GET['m'];
if ($m == "offer1") {$link = "http://affiliatenetwork.com/trackingid/";}
So in my page I have the following url
www.mysite.com/affiliate.php?m=offer1
so when someone clicks on this page would be redirected to this link
http://affiliatenetwork.com/trackingid/
So, my question is I would like the link to be the same
www.mysite.com/affiliate.php?m=offer1
but I would like to use 2 possible destination 1) desktop affiliate network 2) mobile affiliate network
so this the URL I wold use on my normal WP page (like before)
www.mysite.com/affiliate.php?m=offer1
but I would to check if browser is desktop or mobile/tablet (user agent I think)
if desktop redirect here
http://affiliatenetwork.com/trackingid/
if mobile tablet redirect here
http://MOBILEaffiliatenetwork.com/trackingid/
Does it make sense? can you help?
thanks in advance
Kind regards
<a href="affiliate.php?m=offer1">offer1</a>
Where XXXXXX is the merchant.
the php CODE LOOKS LIKE THIS
$m = $_GET['m'];
if ($m == "offer1") {$link = "http://affiliatenetwork.com/trackingid/";}
So in my page I have the following url
www.mysite.com/affiliate.php?m=offer1
so when someone clicks on this page would be redirected to this link
http://affiliatenetwork.com/trackingid/
So, my question is I would like the link to be the same
www.mysite.com/affiliate.php?m=offer1
but I would like to use 2 possible destination 1) desktop affiliate network 2) mobile affiliate network
so this the URL I wold use on my normal WP page (like before)
www.mysite.com/affiliate.php?m=offer1
but I would to check if browser is desktop or mobile/tablet (user agent I think)
if desktop redirect here
http://affiliatenetwork.com/trackingid/
if mobile tablet redirect here
http://MOBILEaffiliatenetwork.com/trackingid/
Does it make sense? can you help?
thanks in advance
Kind regards

