As always trying to use search engine marketing and optimization (SEM&O) in the best possible way, I try to combine them so they both workout perfectly.
Without delaying, here is the script that will create redirects for ClickBank (if you notice errors or want improvement, you can drop a comment):
For those of you who do not like reading useless instructions, a link would look like this:
Store
How to use the script
1. Save the script as cb.php or something else and upload it
2. Change the line: $nickname = ‘multiz’; to $nickname = ‘YourClickbankNickname’;
3. Link to merchant or store using their Clickbank ID (usually found as the subdomain after your Nickname; http://yourNickname.storeID.hop.clickbank.net)
4. Link like this cb.php?s=STORE-ID (although obvious, make sure you change STORE-ID; you have no idea how many people will mess this up)
Advanced parameters
1. You can add tracking IDs by linking like this: cb.php?s=STORE-ID&tid=TRACKING-ID
2. Add any extra parameters: cb.php?s=STORE-ID&x=MORE-Parameters
For more parameters, you will need to URL-encode any extra “=” or “&”.
Other tips (SEO & SEM)
1. Change robots.txt by adding Disallow: /cb.php to a new line
2. Add title attributes to links (can increase conversions and provide a little better SEO) Store
3. Keep your pagerank by adding rel=”nofollow” to links Store
FYI: This should be able to prevent sneaky Adware that tries to place their ClickBank ID in your ClickBank links.