Пример #1
0
    echo "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=" . $myts->oopsHtmlSpecialChars($url) . "\"></meta></head><body></body></html>";
}
//
// From outside server
//
$xoopsurl = preg_replace("/\\//", "\\\\/", XOOPS_URL);
if (!preg_match("/^" . $xoopsurl . "/i", $url)) {
    Header("Location: {$url}");
}
//
// From my server
//
$mb = new mb_func();
$down = new download($url);
$filename = $down->fnameOnServer();
$ctype = $down->contentType();
$fpathname = XOOPS_ROOT_PATH . "/uploads/mydownloads/" . $down->fnameOnServer();
$fpathname = $mb->internal2x($fpathname, $xoopsModuleConfig['filename_code']);
if (!file_exists($fpathname)) {
    redirect_header("brokenfile.php?lid={$lid}", 3, sprintf(_MD_FILEPATHNOTEXIST, $filename));
    exit;
}
ob_clean();
$browser = $version = 0;
UsrBrowserAgent($browser, $version);
@ignore_user_abort();
@set_time_limit(0);
if ($browser == 'IE' && ini_get('zlib.output_compression')) {
    ini_set('zlib.output_compression', 'Off');
}
header("Content-Transfer-Encoding: binary");