#!/usr/bin/php $value) { $iniString .= "$key=\"$value\"\n"; } /* Write the INI string to the plugin config file. */ $directoryPath = dirname($proxy_file); /* Check if the directory exists. */ if (! is_dir($directoryPath)) { /* Create the directory if it doesn't exist. */ mkdir($directoryPath, 0755, true); } /* Write the proxy.cfg file. */ file_put_contents($proxy_file, $iniString); } /* Main entry point, */ /* Use the default proxy config file if one isn't passed to the script. */ $proxy_file = isset($argv[1]) ? $argv[1] : $proxy_config_file; create_proxy($proxy_file); ?>