A while ago a friend of mine wanted to run an ‘internet directory’ using a php/mysql based script called Dew-NewPHPLinks.

He wanted to add a whole bunch of categories but the online standard way to do this really is a bit cumbersome to add more than a handfull at a time. I helped him out by writing a little php script that adds categories from a txt file with a fairly straightforward layout.

You can find the script here.

I really can’t remember the exact purpose of formatting/parameters, but the script itself contains a little example commented in which I remember was straightforward at the time.

Remember to change the path to your categories-textfile and your mysql connection parameters as needed.