array( 'method' => 'GET', 'header' => "User-Agent: $user_agent\r\n" ) )); $content = file_get_contents($url, false, $context); } return $content; } function download_and_require($file, $source, $force = false) { if (!file_exists($file) || $force) { $content = ld_http_get($source); if (empty($content)) { error("Can't retrieve file $source."); } file_put_contents($file, $content); fix_perms($file); } require_once($file); } function fix_perms($target) { if (defined('LD_UNIX_USER')) { chown($target, LD_UNIX_USER); } if (defined('LD_UNIX_GROUP')) { chgrp($target, LD_UNIX_GROUP); } if (defined('LD_UNIX_PERMS')) { chmod($target, LD_UNIX_PERMS); } } function is_requirable($lib) { $paths = explode(PATH_SEPARATOR, get_include_path()); foreach ($paths as $path) { if (@file_exists("$path/$lib")) { return true; } } return false; } function ld_mkdir($directory) { if (!is_writable(dirname($directory))) { error("Can't create folder $directory. Check your permissions."); } mkdir($directory); fix_perms($directory); } function out($message, $class = 'ok') { if (defined('LD_CLI') && constant('LD_CLI')) { fwrite(STDOUT, "# $message"); fwrite(STDOUT, PHP_EOL); } else { echo '
  • ' . $message . "
  • \n"; flush(); } } function error($message) { out($message, 'error'); ?>
    La Distribution Installer

    La Distribution Installer

    Thank you for downloading this installer.

    It will help you install La Distribution in less than a minute.

    If you encouter any problem, please visit our forums, it should be easy to fix!