If I could write PHP, I'd be a very dangerous webmaster.
I ended up buying and installing LinkX. JMBSoft has good products.
I doubt I'll need all the stuff LinkX comes with, but it's a robust little script that leaves room for growth and the price is right too.