old php script I wrote in 2006 to generate pretty indexes