Ceu adlı üyeden alıntı:
mesajı görüntüle
error_log da memory hatası veriyor RAM yetmiyor büyük ihtimal, fakat ben indirmesini istediğin dosyayı işlemeden okumadan indiremezmiyim tek istediğim kaynağın gizlenmesi.
31
●2.219
<?php
ob_start();
session_start();
$VeritabaniBaglantisi = mysql_connect("localhost", "root","");
mysql_select_db("wp", $VeritabaniBaglantisi);
mysql_query("SET NAMES UTF8");
$test = $_GET['fileID'];
$SQLSorgusu = "SELECT * FROM kontrol WHERE id LIKE '$test'";
$result = mysql_query($SQLSorgusu);
while ($veri = mysql_fetch_array($result)) {
$link = $veri["url"];
$adi = $veri["adi"];
}
$dosyaturu = explode ("/",$link);
$say = count($dosyaturu)-1;
$idbol = explode('.',$dosyaturu[$say]);
$uzanti = $idbol[1];
header("Cache-control: private");
header("Content-Disposition: attachment; filename=" . basename($link));
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('Content-Type: application/'.$uzanti.'');
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header('location: http://localhost/link/indir/download.php?fileID='.$test.'');
?>