Файл: 233/d.php
Строк: 53
<?php
include 'conf.php';
$down = rand(1111111111,9999999999);
$url = 'http://wapox.net/loads/olo/files/'.$_GET['id'].'';
function extension($path)
{
return pathinfo($path, PATHINFO_EXTENSION);
}
$format = extension($url);
$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='.$down.'.'.$format.'');
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;
?>