Turns out this tutorial is by one of ABW's own.

A neat little PHP script to redirect and mask links.

http://www.affiliatei.com/articles/link-masking.php

Frank