*NO* PHP at all btw:
Create subdirectories for each "promotion target" in the /links directory, like /links/YourSponsor-NasySite/ ...
... and stuff this into each subdirectory's .htaccess (this will need editing each subdir's htaccess for the appropiate redirection target):
Code:
RewriteEngine On
RewriteRule ^.*$ http://www.YourSponsor.com/?affiliate=You&site=NastySite