Forum Moderators: open
1. For example, if I were an affiliate of Amazon.com , and want to sell a music-book from Amazon. Normally, I would simply add a link like:
<a href>amazon.com?ProductID=musicbook&Affiliate_ID=123</a>
so, normally, it will go to Amazon.com with my affiliate ID
2. But instead of going directly to Amazon.com with my affiliate ID; I want the link to look like:
www.mydomain.com/musicbook.htm
3. So that, When user click the link, it will go to my
www.mydomain.com/musicbook.htm page and immediately redirect to Amazon.com site with my affiliate ID.
4. The purpose is :
So user does not know it is an affiliate link, and avoid people going directly to Amazon.com without clicking my affiliate link. And also, to track how many people click on this link.
I know quite a few sites are using this. Using PHP, how can I create a code like this?
Thanks for your kind help.
Lost webmaster.
your url would look like this
<a href>somefolder/adv.asp?num=SomeUniqueNumber</a>
Then your adv.asp file would look something like this
<%
dim num
num= request.querystring("num")
if(num='1')then
response.redirect("http://amazon.com?ProductID=musicbook&Affiliate_ID=123")
end if
%>