Have you read about $readini and /writeini? Also check out $ini.