hi I coded the code bellow my self, and I get a f*ing internal server error every time, I'm getting sick and tired of this, please help:
<?
function doer($str)
{
$d = base64_decode($str);
$a = explode('<||>',$d);
$v =array(
'path' => $a[0],
'size' => $a[1],
'type' =>$a[2]
);
return $v;
}
?>
<?
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT\n");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
$a= doer($_GET['d']);
$type = $a['type'];
header("Content-type: application/".$type.";\n"); //or yours?
header("Content-Transfer-Encoding: binary");
$filename = $a['path'];
$len = $a['size'];
header("Content-Length: $len;\n");
$outname="downfile.".$type;
header("Content-Disposition: attachment; filename=\"$outname\";\n\n");
$filename = 'http://example.com/tst/'.$a['path'];
readfile($filename);
?>
more info: this script should be putted on (http://example.com/tst/) and all of files are stored in (http://example.com/tst/downloads). also there's no .htaccess file