this script reads files in .ini format and is super-terrible of performance because every time you call the function, the file is opened, scanned and closed!
For now, suits my needs.
however, if anyone wants to build on that, feel free to do so. Maybe you have a better way (there most likely is, I just do not have the experience yet)