Rather than explain it, I'll just point you to our working version of the code. You may also want to look at the project homepage.
Golfstatkeeper is in for a complete rewrite; I wouldn't try to figure anything out of the current sources (although they are usable).
Last modified: Thu Jun 14 01:20:23 EDT 2001