I ran into a situation recently where I had multiple CodeIgniter apps which depended on the same config values. No problem, right? Just use a common third_party folder. That would work, except they were on different servers! My solution was to echo the config as JSON in one place, grab the JSON in other apps and load them as config values. Now you can do the same!
Now in your controller, use the curl_load spark to load the config file:
If you need to secure the values of the config file, you can add optional http authentication credentials:
Or you could load an array of config files:
Last but not least: You can set it to autoload config files in config/curl_load.php. Just add your config files in the same array format as above:
This is really cool, especially when you autoload the spark as well. Then your config values will automatically be loaded without you having to do anything!