The scenario is like this
1) A visitor posts a link of a product on a forum.Lets say it as http://www.xyz.com
2) The link is displayed as http://www.xyz.com on the screen
3) On clicking the above link, it communicates to www.mywebsite.com/link?http://www.xyz.com & attaches the affiliate codes for www.xyz.com & opens it.
Similarly, when another product from a diffrnt site is posted, it attaches a diffrnt code & opens that website.
Many coupon sharing/deal sharing websites are doing this by creating a centralized database of affiliate links & based on the posted URL, the affiliate codes are attached when someone clicks on that link.
Is there any script to incorporate this OR how do i make one?