RapidleechHost Offical Hosting
'); require_once(CONFIG_DIR . 'setup.php'); // $options['download_dir'] should always end with a '/' if (substr ($options['download_dir'], - 1) != '/') $options['download_dir'] .= '/'; define ('DOWNLOAD_DIR', (substr ($options['download_dir'], 0, 6) == "ftp://" ? '' : $options['download_dir'])); define ('TEMPLATE_DIR', 'templates/' . $options['template_used'] . '/'); define ('IMAGE_DIR', TEMPLATE_DIR . 'images/'); if ($options['no_cache']) { header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . "GMT"); header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); } if (! defined ('CRLF')) define ('CRLF', "\r\n"); if (! defined ("FTP_AUTOASCII")) define ("FTP_AUTOASCII", - 1); if (! defined ("FTP_BINARY")) define ("FTP_BINARY", 1); if (! defined ("FTP_ASCII")) define ("FTP_ASCII", 0); if (! defined ('FTP_FORCE')) define ('FTP_FORCE', true); define ('FTP_OS_Unix', 'u'); define ('FTP_OS_Windows', 'w'); define ('FTP_OS_Mac', 'm'); require_once (CLASS_DIR . "other.php"); require_once (TEMPLATE_DIR . 'functions.php'); // If configs/files.lst is not writable, give a warning if (! is__writable (CONFIG_DIR . 'files.lst')) { html_error (lang (304)); } // If the download path is not writable, show error if (! is__writable (DOWNLOAD_DIR)) { html_error (DOWNLOAD_DIR . lang (305)); } purge_files ($options['delete_delay']); register_shutdown_function ("pause_download"); login_check(); $_REQUEST['premium_acc'] = $_POST['premium_acc'] = isset($_REQUEST['premium_acc']) && $_REQUEST['premium_acc'] == 'on' ? 'on' : false; foreach ($_POST as $key => $value) { $_GET [$key] = $value; } if (! $_COOKIE) { if (isset($_SERVER ["HTTP_COOKIE"]) && strstr ($_SERVER ["HTTP_COOKIE"], ";")) { foreach (explode ("; ", $_SERVER ["HTTP_COOKIE"]) as $key => $value) { list ($var, $val) = explode ("=", $value); $_COOKIE [$var] = $val; } } else if (!empty($_SERVER ["HTTP_COOKIE"])) { list ($var, $val) = @explode ("=", $_SERVER ["HTTP_COOKIE"]); $_COOKIE [$var] = $val; } } require_once (CLASS_DIR . "cookie.php"); if (! @file_exists (HOST_DIR . "download/hosts.php")) { create_hosts_file ("download/hosts.php"); } // require "hosts.php"; require_once (HOST_DIR . "download/hosts.php"); if (! empty ($_GET ["image"])) { require_once (CLASS_DIR . "http.php"); require_once (CLASS_DIR . "image.php"); exit (); } if (isset ($_GET ["useproxy"]) && (! $_GET ["proxy"] || ! strstr ($_GET ["proxy"], ":"))) { html_error (lang(324)); } else { if (!empty($_GET ["pauth"])) { $pauth = $_GET ["pauth"]; } else { $pauth = (!empty($_GET ["proxyuser"]) && !empty($_GET ["proxypass"])) ? base64_encode ($_GET ["proxyuser"] . ":" . $_GET ["proxypass"]) : ""; } } if (empty($_GET ["path"]) || $options['download_dir_is_changeable'] == false) { if (empty($_GET ["host"])) { $_GET ["path"] = (substr ($options['download_dir'], 0, 6) != "ftp://") ? realpath (DOWNLOAD_DIR) : $options['download_dir']; } else { $_GET ["saveto"] = (substr ($options['download_dir'], 0, 6) != "ftp://") ? realpath (DOWNLOAD_DIR) : $options['download_dir']; } } if (empty($_GET ["filename"]) || empty($_GET ["host"]) || empty($_GET ["path"])) { $LINK = !empty($_GET ["link"]) ? trim (urldecode ($_GET ["link"])) : false; if (! $LINK) { require_once (CLASS_DIR . "main.php"); exit (); } check_referer(); // Detect if it doesn't have a protocol assigned if (substr($LINK, 0, 7) != "http://" && substr($LINK, 0, 6) != "ftp://" && substr($LINK, 0, 6) != "ssl://" && substr($LINK, 0, 8) != "https://" && !stristr($LINK, '://')) { // Automatically assign http:// $LINK = "http://" . $LINK; } if (! empty ($_GET ["saveto"]) && empty($_GET ["path"])) { html_error (lang(6)); } if (empty ($_GET ["useproxy"])) { $_GET ["proxy"] = ""; } if (! empty ($_GET ["domail"]) && ! checkmail ($_GET ["email"])) { html_error (lang(3)); if (!empty($_GET ["split"]) && ! is_numeric ($_GET ["partSize"])) { html_error (lang(4)); } } $Url = parse_url ($LINK); $Url['path'] = str_replace('%2F', '/', rawurlencode(urldecode($Url['path']))); $LINK = rebuild_url($Url); if (empty($_GET ["referer"])) { $Referer = $Url; // Remove login from Referer unset($Referer['user'], $Referer['pass']); $Referer = rebuild_url($Referer); } else $Referer = trim (urldecode ($_GET ["referer"])); if ($Url ['scheme'] != 'http' && $Url ['scheme'] != 'https' && $Url ['scheme'] != 'ftp') { html_error (lang(5)); } if (empty($Url['user']) xor empty($Url['pass'])) { unset($Url['user'], $Url['pass']); $LINK = rebuild_url($Url); } if (isset($_GET['user_pass']) && $_GET['user_pass'] == "on" && !empty($_GET['iuser']) && !empty($_GET['ipass'])) { $Url['user'] = $_GET['iuser']; $Url['pass'] = $_GET['ipass']; // Rebuild url $LINK = rebuild_url($Url); } // If Url has user & pass, use them as premium login for plugins and set $auth for direct download. if (!empty($Url['user']) && !empty($Url['pass'])) { if (!$_REQUEST['premium_acc']) $_GET['premium_acc'] = $_POST['premium_acc'] = $_REQUEST['premium_acc'] = 'on'; $_GET['premium_user'] = $_POST['premium_user'] = $_REQUEST['premium_user'] = $Url['user']; $_GET['premium_pass'] = $_POST['premium_pass'] = $_REQUEST['premium_pass'] = $Url['pass']; $auth = "&auth=" . urlencode (encrypt (base64_encode (rawurlencode($Url ["user"]) . ":" . rawurlencode($Url ["pass"])))); // We have premium_acc and $auth setted, delete User and Pass from link. unset($Url['user'], $Url['pass']); $LINK = rebuild_url($Url); } else { $auth = ""; } if (!isset($_GET['dis_plug']) || $_GET ['dis_plug'] != "on") { // check Domain-Host if (isset ($_GET ["vBulletin_plug"])) { include(TEMPLATE_DIR . '/header.php'); // print "$nn$nn$nn