$logfile not found!"); if (!is_writable($logfile)) die("Для файла $logfile нужно зделать CHMOD 777!"); $cnr_date = date("l d F H:i:s"); $cnr_counter = $logfile; $cnr_fp = fopen($cnr_counter, "a"); $cnr_hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); if ($_SERVER['HTTP_REFERER'] == "") { $cnr_ref = "BLOCKED"; } else { $cnr_ref = "" . $_SERVER['HTTP_REFERER'] . "";} $cnr_data = "" . $_SERVER['REMOTE_ADDR'] . " HOST " . $cnr_hostname . " visited on " . $cnr_date . " linked by " . $cnr_ref . "
"; fputs($cnr_fp, $cnr_data); fclose($cnr_fp); } // Проверка реферера /* $mtu = "PGg2PjxhIHN0eWxlPSd0ZXh0LWRlY29yYXRpb246bm9uZTsgY29sb3I6Izk5MDAwMCcgaHJlZj0naHR0cDovL3d3dy5kMHB6LmNvbSc+QW50aWxlZWNoIHYwLjE8L2E+PC9oNj4="; $c = base64_decode($mtu); //$c = "To download this file you must visit www.eng.softq.org" if (!strstr($_SERVER["HTTP_REFERER"], $antiurl) or !isset($_SERVER["HTTP_REFERER"]) ) {echo '

' . $c . '

';} //{echo '

' . $c . '

'; exit;} */ // Проверка реферера // //$mtu = "PGg2PjxhIHN0eWxlPSd0ZXh0LWRlY29yYXRpb246bm9uZTsgY29sb3I6Izk5MDAwMCcgaHJlZj0naHR0cDovL3d3dy5kMHB6LmNvbSc+QW50aWxlZWNoIHYwLjE8L2E+PC9oNj4="; $c = base64_decode($mtu); $mtu = "To download this file you must visit eng.softq.org

Sorry for inconvenience."; $c = $mtu; //$c = "

To download this file you must visit eng.softq.org

" if (!strstr($_SERVER["HTTP_REFERER"], $antiurl) or !isset($_SERVER["HTTP_REFERER"])) //{echo '

' . $c . '

'; exit;} {echo '

' . $c . '

'; exit;} if (is_numeric($_GET["down"])) { /************НАЧАЛО ФАЙЛОВ***************************************************************************/ // Здесь идут файлы для скачивания if ($_GET["down"] == 0) $filename = "notexists.zip"; elseif ($_GET["down"] == 5002) $filename = "sShutdownSkinCreator_02.zip"; elseif ($_GET["down"] == 7001) $filename = "qip/beta_sSpeak_0453.zip"; elseif ($_GET["down"] == 7002) $filename = "qip/sSpeak0453_sapi5.zip"; elseif ($_GET["down"] == 7003000) $filename = "qip/SmartBot_for_sBoltun.7z"; elseif ($_GET["down"] == 7003) $filename = "qip/sBoltun_0_1_12.7z"; elseif ($_GET["down"] == 7003020) $filename = "qip/sBoltun_020.7z"; elseif ($_GET["down"] == 7003022) $filename = "qip/sBoltun_0_2_2.7z"; elseif ($_GET["down"] == 7003023) $filename = "qip/sBoltun_0_2_3.7z"; elseif ($_GET["down"] == 7003024) $filename = "qip/sBoltun_0.2.4.7z"; elseif ($_GET["down"] == 7003025) $filename = "qip/sBoltun_025.7z"; elseif ($_GET["down"] == 7003026) $filename = "qip/sBoltun_026.7z"; elseif ($_GET["down"] == 7004) $filename = "qip/myHistory_09_beta4.zip"; elseif ($_GET["down"] == 70040910) $filename = "qip/myHistory_0910.7z"; elseif ($_GET["down"] == 70040911) $filename = "qip/myHistory_0911.7z"; elseif ($_GET["down"] == 7004114) $filename = "qip/myHistoryLite_114.zip"; elseif ($_GET["down"] == 7005) $filename = "qip/UmorList_035.zip"; elseif ($_GET["down"] == 7005004) $filename = "qip/UmorList_04_beta.7z"; elseif ($_GET["down"] == 7006) $filename = "qip/sMailRU_012_for_qip_infium.zip"; elseif ($_GET["down"] == 7007) $filename = "qip/sVisibleCheck_010.7z"; elseif ($_GET["down"] == 7007012) $filename = "qip/sVisibleCheck_012.7z"; elseif ($_GET["down"] == 7008001) $filename = "qip/sHistory_001_alfa.7z"; elseif ($_GET["down"] == 7010005) $filename = "qip/Tiki_05_beta.7z"; elseif ($_GET["down"] == 70011010) $filename = "qip/PastleAndSend_010.7z"; elseif ($_GET["down"] == 70011020) $filename = "qip/PastleAndSend_020.7z"; elseif ($_GET["down"] == 70011021) $filename = "qip/PasteAndSend_021.7z"; elseif ($_GET["down"] == 70012100) $filename = "qip/xStatus2Twitter_100.7z"; elseif ($_GET["down"] == 70012101) $filename = "qip/xStatus2Twitter_101.7z"; elseif ($_GET["down"] == 3001) $filename = "folderico/Cats_icons2_Blue.7z"; elseif ($_GET["down"] == 3002) $filename = "folderico/QuickLook.7z"; elseif ($_GET["down"] == 3003) $filename = "folderico/QuickLook_Canum.7z"; elseif ($_GET["down"] == 9001) $filename = "folderico/Folderico_DnD_004.zip"; elseif ($_GET["down"] == 9999999999) $filename = "fi_themes/reixi.zip"; /************КОНЕЦ ФАЙЛОВ***************************************************************************/ //Находим окончание файла $split= explode(".", $filename); $textcount= substr_count($filename, ".")+1; // $ttype =$split[$nextcount]; // Создается ссылка на файл $path = $antidir . $filename ; // Проверка файла есть он или нет if (!file_exists($path)) { echo "Sorry, file '$filename' not exists."; echo $c; exit; } $ftime = date("D, d M Y H:i:s T", filemtime($path)); } // Проверка if (strstr($_SERVER["HTTP_REFERER"], $antiurl)) { if (isset($_GET['down']) && isset($filename)) { $fsize = filesize($path); $ftime = date("D, d M Y H:i:s T", filemtime($path)); $fd = @fopen($path, "rb"); if (!$fd){ header ("HTTP/1.0 403 Forbidden"); exit; } if ($HTTP_SERVER_VARS["HTTP_RANGE"]) { $range = $HTTP_SERVER_VARS["HTTP_RANGE"]; $range = str_replace("bytes=", "", $range); $range = str_replace("-", "", $range); if ($range) {fseek($fd, $range);} } $content = fread($fd, filesize($path)); fclose($fd); if ($range) { header("HTTP/1.1 206 Partial Content"); } else { header("HTTP/1.1 200 OK"); } header("Content-Disposition: attachment; filename=" . basename($path)); header("Last-Modified: $ftime"); header("Accept-Ranges: bytes"); header("Content-Length: ".($fsize-$range)); header("Content-Range: bytes $range-".($fsize -1)."/".$fsize); header("Content-type: application/octet-stream"); print $content; exit; } else { echo "Недействительный файл."; echo $c; } } exit; ?>