Fine since Matt started this whole thing on hiding links and how people do it in really silly ways like putting nonsense in the onMouseOver WindowStatus I thought why not have a little fun and throw out a nice tip on how to mask your affiliate links.
Hypothetically speaking let’s say you’ve got a thin affiliate site, and you’re of the opinion having all affiliate links out is a “bad quality” indicator, or maybe you want to redirect your links for tracking, or maybe you even buy into the whole “no follow” advertising BS. Here’s one way to do it:
Now you update your script that so when it detects the “p” parameter instead of redirecting to amazon.com as a straight link it grabs the affiliate link in your database for ID 12345 and redirects accordingly. Regular people will think it’s a straight link and not an affiliate link. Now let’s get even more crafty
Lets make our script even smarter if the “P” parameter starts with an “A” we go and get the affiliate link from the database, if it starts with a “B” it’s just a dummy value and we use the URL value anyway. With the goal of being a responsible programmer I’d say you should use the “url” parameter as the default value and overwrite accordingly, but I digress. Want to get even more crafty how about this
Lastly as a responsible programmer I should also warn you about not leaving yourself open to abuse. You should check for a referrer, and strip it down to the base domain, if it’s not you take whatever action you deem appropriate. Sure the examples given here might be pretty easy to spot, but they were also highly examplified. You could totally wonk things up adding random numbers or unix time values in for the dummy values, which would really make things harder to reverse engineer. You could also put the actual landing page URL instead of the simplified version I did here just to make things look that little bit more legit to pesky humans. There are few other things you can do, but I have to keep a few things dark and mysterious.