Affiliation class
Why this script is for you: All the functionality is available from classes which makes it easy to integrate into your website. It will track any referred visitor and certain functions will allow you to display these statistics. It also includes a database and a validation class to filter inputed content or the referral itself. And of course well written documentation to get you started.