if ($_GET['down']){
$dfile = $_GET['down'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://sayt.uz/".$dfile);
/*
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
*/
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_REFERER, "http://sayt.uz/".$dfile);
// curl_setopt ($ch, CURLOPT_AUTOREFERER, 1);
$result = curl_exec($ch);
curl_close($ch);
if ($result)
{
//$gfile = 'site_ru_'.$dfile;
header('Content-Type: video/mp4');
header('Content-Disposition: attachment; filename=' . $dfile);
header('Content-Length: ' . strlen($result));
echo $result;
exit();
}
}else{
$dfile = $_GET['down'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://sayt.uz/".$dfile);
/*
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
*/
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_REFERER, "http://sayt.uz/".$dfile);
// curl_setopt ($ch, CURLOPT_AUTOREFERER, 1);
$result = curl_exec($ch);
curl_close($ch);
if ($result)
{
//$gfile = 'site_ru_'.$dfile;
header('Content-Type: video/mp4');
header('Content-Disposition: attachment; filename=' . $dfile);
header('Content-Length: ' . strlen($result));
echo $result;
exit();
}
}else{