I think I posted the wrong link. That was a first attempt:

Phra Yuttadhammo said that this was a php script based on the javascript:

http://pali.sirimangalo.org/paliorder2.html

I found that it worked fast enough with a word list of the entire
Dhammapada. It stripped out duplicates and sorted it. Phra Yuttadhammo is
improving the code to cater for Uppercase.