Do a quick search on google for DMOZ directory scripts.
I'm not sure if it's possible to download the entire dmoz directory for use on your site, but there are many many scripts that will allow you to display and cache results in a mysql database.
Enjoy!