Hi,
I just cannot download ! My goal is to offer my visitors different downloads (zip for now) and hide the real download address (on an external server). I put up a little script, it seems to work but the downloaded files are just 3 bytes long (while they should be more than 30kb long)!
What is wrong then ?
Thanks for any help !
[code=php]<?
$name = “myfile.zip” //or .rar
$gogo = ‘Content-Disposition: attachment; filename=”‘.$name.'”‘;
$add=”http://www.myothersite.com/”.$name;
$content_len=@filesize($add);
Header(“Content-type: application/zip”);
Header(“Content-type: octet-stream”);
Header($gogo);
if($content_len!=FALSE)
{
Header(“Content-length: $content_len”);
}
readfile($add);
?>