A php tutorial on "hard-to-read numbers that you have to type in in order to proceed" from http://www.zend.com :
http://www.zend.com/zend/tut/tutorial-mehmet1.php

To do what you asking with PHP it wouldn't take much, just a good secure user authentication system, a well designed database, and plenty of links to advertisers.

My thinking is that the authentication page would set some handy $_SESSION variables, and then when clicking on a link it would actually look more like h t t p://foo.com/linkpassthru.php?url=advertisersite.com and the linkpassthru page would take those $_SESSION variables and use them to identify the user and them update the db to say that they clicked on advertisersite.com and then it would redirect them to that site.

It isn't that it would be hard, its just that it would be tedious to make sure that someone doesn't take advantage of the system and that your advertisers to take advantage of you. I'd make darn sure that you know the who, when, and how many so that when the advertisers say were paying for X amount of traffic you can be like "What about the other (Y-X)?" and they say "Prove it." and you'll output a DB report with more information that the bastards ever though possible.

You could do it with a flat file, but... that brings other issues.

Salut,
Dhej