Cloaking Affiliate Links Using PHP

Submitted by rayd8 on Thu, 12/21/2006 - 03:28.
For those of you that missed it here is a Screencast that Jeremy did that explains what affiliate cloaking is and how to do it using PHP:
http://www.screencast.com/users/JeremyPalmer/media/ca1e7496-428a-4431-bd3f-14d4dff3e42d

Cloaking Affiliate Links Using PHP
I've added Jeremy's blog to my personalized Google homepage, and had noticed it earlier in the week. I just viewed it, and it really does clear up a lot and make it look ultra easy.
Using PHP one can also pass variables such as an SID for tracking, too.
Further Advice on the cloaking
I watched JP's video on cloaking which I thought was excellent, however I have one more question.
Further Advice on the cloaking
If I have several links on the page and I want to cloak them. Do I need to set up seperate PHP pages or can I have them linking to the one php page?
Best Regards
James
Re: Further Advice on the cloaking
You can put several links on the same page using a simple PHP "if" or "switch" statment.
Here's a quick example:
<?php $redirect_page = $_GET['exit_link']; switch ($redirect_page) { case "link1": header("Location:http://www.anrdoezrs.net/click-1234567-10378999"); break; case "link2": header("Location:http://www.kqzyfj.com/click-1234567-10387033"); break; case "link3": header("Location:http://www.jdoqocy.com/click-1234567-10278209"); break; } ?>TY heaps
Your a bloody legend! Thanks heaps for explaining, I get the picture now. Have to say the last few month has been a great learning curve. Really starting to get my head around some of this code stuff!! Very Nerdy but great fun.. Look forward to maybe posting our new little niche site, born out of frustration and passion. :)
Kudos