Need Urgent Help In code based on redirecting based on words
Posted: Mon Jun 16, 2014 3:19 pm
Hi ,
I need a urgent Help regarding Php code which is based on automatic redirecting a url to affiliate url based on words in url.
this is the code i am using:
But the problem is that when the amzon url is like :-
http://www.amazon.in/English-Movies-TV- ... 4068584031
it adds the affiliate id like this:-
http://www.amazon.in/English-Movies-TV- ... filiate_id
but i want it to be like :-
http://www.amazon.in/English-Movies-TV- ... filiate_id
Means i need to add "&affiliate_id" athe end of url everytime if it is of amazon.
Please refer my website :http://www.bestonlinedeals.co.in
I need a urgent Help regarding Php code which is based on automatic redirecting a url to affiliate url based on words in url.
this is the code i am using:
Code: Select all
if( stripos($mylink,"amazon.in")>0)
{ if(strpos($mylink,"?")>0)
$tmp = $mylink.str_replace("?","&","?affiliate_id");
else
$tmp = $mylink."?affiliate_id";
$loc = "Location:".$tmp;
header($loc);
exit();
}http://www.amazon.in/English-Movies-TV- ... 4068584031
it adds the affiliate id like this:-
http://www.amazon.in/English-Movies-TV- ... filiate_id
but i want it to be like :-
http://www.amazon.in/English-Movies-TV- ... filiate_id
Means i need to add "&affiliate_id" athe end of url everytime if it is of amazon.
Please refer my website :http://www.bestonlinedeals.co.in