Файл: mp3/d.php
Строк: 45
<?php
include 'conf.php';
$down = htmlspecialchars(trim($_GET['down']));
$url = 'http://poiskm.org/?do=getById&id='.$down.'';
$file = $url;
$url = $url;
$finfo = new SplFileInfo($file);
$fn = $finfo->getFilename();
if ($h = get_headers($url, 1)):
if (!empty($h['Location'])):
$url = $h['Location'];
$h = get_headers($url, 1);
endif;
if (ob_get_level())
ob_end_clean();
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=Na-pozitive.Ru_'.$down.'.mp3');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . $h['Content-Length']);
readfile($file) . exit;
else:
header('location: ' . $file) . exit;
endif;
?>