Location: PHPKode > projects > MJGUEST > mjguest/setup/setup_generator.php
<?php

ob_start();

#@ini_set('include_path', './');
set_magic_quotes_runtime(0);
@ini_set('magic_quotes_sybase',	false);
ignore_user_abort(true);
@ini_set('session.use_cookies', 1);

session_start();
@register_shutdown_function('session_write_close');

$cookiekey = md5(uniqid(rand(), true));
$filecontents = "<?php
define('db_type', '{$_SESSION['DB_type']}');
define('db_host', '{$_SESSION['DB_host']}');
define('db_port', '{$_SESSION['DB_port']}');
define('db_user', '{$_SESSION['DB_user']}');
define('db_pass', '{$_SESSION['DB_pass']}');
define('db_name', '{$_SESSION['DB_name']}');
define('db_flag', '{$_SESSION['DB_flag']}');
define('mjguest_debugmode', false);
define('mjguest_cookiekey', '{$cookiekey}');
?>";

ob_clean();

header('Content-Type: text/x-delimtext; name="setup.ini.php"');
header('Content-Disposition: attachment; filename="setup.ini.php"');
header('Content-Transfer-Encoding: ascii');

echo $filecontents;

ob_end_flush();
exit;

?>
Return current item: MJGUEST